about summary refs log tree commit diff
path: root/instrumentation/afl-llvm-common.h
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2021-12-14 22:10:19 +0100
committerGitHub <noreply@github.com>2021-12-14 22:10:19 +0100
commit02fba1cc7e8709c8e0961454136a64f373e4f9ff (patch)
tree4268feaff62895b2a2ef2b793c36534f5771bda5 /instrumentation/afl-llvm-common.h
parent22e2362f0fd5685548696f487639104a0059e3eb (diff)
parent2564eb6f8c8ed49b0ec30e1e297ad93067e8f1f2 (diff)
downloadafl++-02fba1cc7e8709c8e0961454136a64f373e4f9ff.tar.gz
Merge pull request #1215 from AFLplusplus/dev
Push to stable
Diffstat (limited to 'instrumentation/afl-llvm-common.h')
-rw-r--r--instrumentation/afl-llvm-common.h10
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);