Skip to content

Commit 97bfead

Browse files
committed
Auto merge of #38195 - rkruppe:llvm-pass-name-fwdcompat, r=alexcrichton
[LLVM 4.0] test/run-make/llvm-pass/ cc #37609
2 parents 7537f95 + 9a3340a commit 97bfead

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/test/run-make/llvm-pass/llvm-function-pass.so.cc

+6-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ namespace {
2828

2929
bool runOnFunction(Function &F) override;
3030

31-
const char *getPassName() const override {
31+
#if LLVM_VERSION_MAJOR >= 4
32+
StringRef
33+
#else
34+
const char *
35+
#endif
36+
getPassName() const override {
3237
return "Some LLVM pass";
3338
}
3439

src/test/run-make/llvm-pass/llvm-module-pass.so.cc

+6-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ namespace {
2727

2828
bool runOnModule(Module &M) override;
2929

30-
const char *getPassName() const override {
30+
#if LLVM_VERSION_MAJOR >= 4
31+
StringRef
32+
#else
33+
const char *
34+
#endif
35+
getPassName() const override {
3136
return "Some LLVM pass";
3237
}
3338

0 commit comments

Comments
 (0)