diff options
| author | Hexcoder <heiko@hexco.de> | 2019-06-03 23:20:47 +0200 |
|---|---|---|
| committer | Hexcoder <heiko@hexco.de> | 2019-06-03 23:20:47 +0200 |
| commit | b4678b77f1e090e78935a50c98a4493ee2abda09 (patch) | |
| tree | ed68a4b136c7ade8138531ca556b7702e2b5460e /llvm_mode/split-switches-pass.so.cc | |
| parent | b3a504248f566e089175b5b42b0bd78c9148993a (diff) | |
| download | afl++-b4678b77f1e090e78935a50c98a4493ee2abda09.tar.gz | |
fix llvm compatibility problems. Should compile now with llvm 3.8.0
up to llvm 8.0
Diffstat (limited to 'llvm_mode/split-switches-pass.so.cc')
| -rw-r--r-- | llvm_mode/split-switches-pass.so.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm_mode/split-switches-pass.so.cc b/llvm_mode/split-switches-pass.so.cc index 12be8a95..8d4db292 100644 --- a/llvm_mode/split-switches-pass.so.cc +++ b/llvm_mode/split-switches-pass.so.cc @@ -45,14 +45,10 @@ namespace { bool runOnModule(Module &M) override; -#if __clang_major__ >= 4 +#if LLVM_VERSION_MAJOR >= 4 StringRef getPassName() const override { #else - #ifndef __GNUG__ const char * getPassName() const override { - #else - StringRef getPassName() const override { - #endif #endif return "splits switch constructs"; } @@ -258,12 +254,8 @@ bool SplitSwitchesTransform::splitSwitches(Module &M) { /* Prepare cases vector. */ CaseVector Cases; for (SwitchInst::CaseIt i = SI->case_begin(), e = SI->case_end(); i != e; ++i) -#if __clang_major__ < 5 - #ifndef __GNUG__ +#if LLVM_VERSION_MAJOR < 5 Cases.push_back(CaseExpr(i.getCaseValue(), i.getCaseSuccessor())); - #else - Cases.push_back(CaseExpr(i->getCaseValue(), i->getCaseSuccessor())); - #endif #else Cases.push_back(CaseExpr(i->getCaseValue(), i->getCaseSuccessor())); #endif |
