diff options
| author | vanhauser-thc <vh@thc.org> | 2021-12-01 11:38:55 +0100 |
|---|---|---|
| committer | vanhauser-thc <vh@thc.org> | 2021-12-01 11:38:55 +0100 |
| commit | 22827e807035a50394bac6a37406b19109fc655f (patch) | |
| tree | 181a6922e0a36a9049ab0318dcb1b7c354efd8f7 /instrumentation/split-switches-pass.so.cc | |
| parent | c2779cc6f9c904cba870e6b1059793cf38261766 (diff) | |
| download | afl++-22827e807035a50394bac6a37406b19109fc655f.tar.gz | |
unify LLVM_VERSION_... usage
Diffstat (limited to 'instrumentation/split-switches-pass.so.cc')
| -rw-r--r-- | instrumentation/split-switches-pass.so.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/instrumentation/split-switches-pass.so.cc b/instrumentation/split-switches-pass.so.cc index 1e32a31d..c0fa7c9c 100644 --- a/instrumentation/split-switches-pass.so.cc +++ b/instrumentation/split-switches-pass.so.cc @@ -37,7 +37,7 @@ #include "llvm/Analysis/ValueTracking.h" #include "llvm/IR/IRBuilder.h" -#if LLVM_VERSION_MAJOR > 3 || \ +#if LLVM_VERSION_MAJOR >= 4 || \ (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 4) #include "llvm/IR/Verifier.h" #include "llvm/IR/DebugInfo.h" @@ -369,10 +369,10 @@ bool SplitSwitchesTransform::splitSwitches(Module &M) { CaseVector Cases; for (SwitchInst::CaseIt i = SI->case_begin(), e = SI->case_end(); i != e; ++i) -#if LLVM_VERSION_MAJOR < 5 - Cases.push_back(CaseExpr(i.getCaseValue(), i.getCaseSuccessor())); -#else +#if LLVM_VERSION_MAJOR >= 5 Cases.push_back(CaseExpr(i->getCaseValue(), i->getCaseSuccessor())); +#else + Cases.push_back(CaseExpr(i.getCaseValue(), i.getCaseSuccessor())); #endif /* bugfix thanks to pbst * round up bytesChecked (in case getBitWidth() % 8 != 0) */ |
