diff options
author | vanhauser-thc <vh@thc.org> | 2024-09-29 17:11:07 +0200 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2024-09-29 17:11:07 +0200 |
commit | b88f132975b41aa16c43ee5e2bc3a243b79330ec (patch) | |
tree | 9e50246d490b9cc5034761278ff68c9a3c8baf44 | |
parent | 12271064f8570213ea4169a2ae94f68304d5a73d (diff) | |
download | afl++-b88f132975b41aa16c43ee5e2bc3a243b79330ec.tar.gz |
llvm20 fix
-rw-r--r-- | docs/Changelog.md | 1 | ||||
-rw-r--r-- | instrumentation/SanitizerCoverageLTO.so.cc | 6 | ||||
-rw-r--r-- | instrumentation/SanitizerCoveragePCGUARD.so.cc | 11 |
3 files changed, 14 insertions, 4 deletions
diff --git a/docs/Changelog.md b/docs/Changelog.md index 68d362db..3800a718 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -29,6 +29,7 @@ - custom mutators: - custom_send_tcp custom mutator added, thanks to @dergoegge - afl-cc + - fix to support pointless changes in LLVM 20 - new runtime (!) variable: `AFL_OLD_FORKSERVER` to use the old vanilla AFL type forkserver. Useful for symcc/symqemu/nautilus/etc. with AFL_LLVM_INSTRUMENT=CLASSIC diff --git a/instrumentation/SanitizerCoverageLTO.so.cc b/instrumentation/SanitizerCoverageLTO.so.cc index 63ea71c1..6ec84dcd 100644 --- a/instrumentation/SanitizerCoverageLTO.so.cc +++ b/instrumentation/SanitizerCoverageLTO.so.cc @@ -50,7 +50,11 @@ #include "llvm/Support/SpecialCaseList.h" #include "llvm/Support/VirtualFileSystem.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/Transforms/Instrumentation.h" +#if LLVM_VERSION_MAJOR < 20 + #include "llvm/Transforms/Instrumentation.h" +#else + #include "llvm/Transforms/Utils/Instrumentation.h" +#endif #if LLVM_VERSION_MAJOR < 17 #include "llvm/Transforms/IPO/PassManagerBuilder.h" #endif diff --git a/instrumentation/SanitizerCoveragePCGUARD.so.cc b/instrumentation/SanitizerCoveragePCGUARD.so.cc index 49fe904b..859b4e7b 100644 --- a/instrumentation/SanitizerCoveragePCGUARD.so.cc +++ b/instrumentation/SanitizerCoveragePCGUARD.so.cc @@ -63,11 +63,16 @@ #if LLVM_VERSION_MAJOR < 15 #include "llvm/Support/raw_ostream.h" #endif -#if LLVM_VERSION_MAJOR < 17 - #include "llvm/Transforms/Instrumentation.h" +#if LLVM_VERSION_MAJOR < 20 + #if LLVM_VERSION_MAJOR < 17 + #include "llvm/Transforms/Instrumentation.h" + #else + #include "llvm/TargetParser/Triple.h" + #endif #else - #include "llvm/TargetParser/Triple.h" + #include "llvm/Transforms/Utils/Instrumentation.h" #endif + #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Transforms/Utils/ModuleUtils.h" |