diff options
author | vanhauser-thc <vh@thc.org> | 2022-03-03 17:11:41 +0100 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2022-03-03 17:11:41 +0100 |
commit | 899fa59ab60e3924f986e17814cdfee544418e08 (patch) | |
tree | bac139f1b9b4ef0a4f7d30844f5bd12a07463cea /instrumentation/cmplog-routines-pass.cc | |
parent | f2831419f5ceb28e1bc0cbf67cada012bccfb843 (diff) | |
download | afl++-899fa59ab60e3924f986e17814cdfee544418e08.tar.gz |
port cmplog-switches-pass
Diffstat (limited to 'instrumentation/cmplog-routines-pass.cc')
-rw-r--r-- | instrumentation/cmplog-routines-pass.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/instrumentation/cmplog-routines-pass.cc b/instrumentation/cmplog-routines-pass.cc index 2c2f2fc4..d146dfa3 100644 --- a/instrumentation/cmplog-routines-pass.cc +++ b/instrumentation/cmplog-routines-pass.cc @@ -83,7 +83,6 @@ class CmpLogRoutines : public ModulePass { } // namespace - #if LLVM_MAJOR >= 11 && 1 == 0 llvmGetPassPluginInfo() { @@ -91,24 +90,24 @@ llvmGetPassPluginInfo() { /* lambda to insert our pass into the pass pipeline. */ [](PassBuilder &PB) { -#if LLVM_VERSION_MAJOR <= 13 + #if LLVM_VERSION_MAJOR <= 13 using OptimizationLevel = typename PassBuilder::OptimizationLevel; -#endif + #endif PB.registerOptimizerLastEPCallback( [](ModulePassManager &MPM, OptimizationLevel OL) { MPM.addPass(SplitComparesTransform()); }); + }}; } + #else char CmpLogRoutines::ID = 0; #endif - - bool CmpLogRoutines::hookRtns(Module &M) { std::vector<CallInst *> calls, llvmStdStd, llvmStdC, gccStdStd, gccStdC, |