diff options
| author | Nikita Popov <npopov@redhat.com> | 2022-09-14 11:34:29 +0200 |
|---|---|---|
| committer | Nikita Popov <npopov@redhat.com> | 2022-09-14 15:54:29 +0200 |
| commit | b27a4a3689983390bbfc48c1bd1ba04e1b1aa935 (patch) | |
| tree | ccf29ecb14af9315092123e18b81c8e4eea5719b /instrumentation | |
| parent | 5452d4652b14bbb311057bb09b0345669491bfac (diff) | |
| download | afl++-b27a4a3689983390bbfc48c1bd1ba04e1b1aa935.tar.gz | |
Fix loading and registeration of LTO pass for new pass manager
Diffstat (limited to 'instrumentation')
| -rw-r--r-- | instrumentation/SanitizerCoverageLTO.so.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/instrumentation/SanitizerCoverageLTO.so.cc b/instrumentation/SanitizerCoverageLTO.so.cc index fb447354..231151f5 100644 --- a/instrumentation/SanitizerCoverageLTO.so.cc +++ b/instrumentation/SanitizerCoverageLTO.so.cc @@ -324,8 +324,11 @@ llvmGetPassPluginInfo() { #if LLVM_VERSION_MAJOR <= 13 using OptimizationLevel = typename PassBuilder::OptimizationLevel; #endif - // PB.registerFullLinkTimeOptimizationLastEPCallback( +#if LLVM_VERSION_MAJOR >= 15 + PB.registerFullLinkTimeOptimizationLastEPCallback( +#else PB.registerOptimizerLastEPCallback( +#endif [](ModulePassManager &MPM, OptimizationLevel OL) { MPM.addPass(ModuleSanitizerCoverageLTO()); |
