diff options
author | vanhauser-thc <vh@thc.org> | 2021-12-14 10:15:00 +0100 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2021-12-14 10:15:09 +0100 |
commit | 75ac9c013c6c39eeb3c3e826fa2d368fa09975a4 (patch) | |
tree | b464809ccf86b21e96013ae417ca2ce5d96c7c32 /instrumentation/afl-llvm-common.h | |
parent | c6bad07d75aa36671ebc32a722566cb145414b08 (diff) | |
download | afl++-75ac9c013c6c39eeb3c3e826fa2d368fa09975a4.tar.gz |
better instrumentlist filename detection
Diffstat (limited to 'instrumentation/afl-llvm-common.h')
-rw-r--r-- | instrumentation/afl-llvm-common.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/instrumentation/afl-llvm-common.h b/instrumentation/afl-llvm-common.h index a1561d9c..bd424e21 100644 --- a/instrumentation/afl-llvm-common.h +++ b/instrumentation/afl-llvm-common.h @@ -32,10 +32,18 @@ typedef long double max_align_t; #include "llvm/Support/CFG.h" #endif +#if LLVM_VERSION_MAJOR >= 11 + #define MNAME M.getSourceFileName() + #define FMNAME F.getParent()->getSourceFileName() +#else + #define MNAME std::string("") + #define FMNAME std::string("") +#endif + char * getBBName(const llvm::BasicBlock *BB); bool isIgnoreFunction(const llvm::Function *F); void initInstrumentList(); -bool isInInstrumentList(llvm::Function *F); +bool isInInstrumentList(llvm::Function *F, std::string Filename); unsigned long long int calculateCollisions(uint32_t edges); void scanForDangerousFunctions(llvm::Module *M); |