diff options
author | hexcoder- <heiko@hexco.de> | 2020-05-15 01:55:33 +0200 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2020-05-15 01:55:33 +0200 |
commit | 182b8a4582c6935507cb8514df09bf2676a78447 (patch) | |
tree | 95450e277eeaf6e34204538fcfc49e44eb372c03 /llvm_mode/afl-llvm-common.cc | |
parent | 97bddc8cfa5920cd4926a69c09db27c55d70be08 (diff) | |
download | afl++-182b8a4582c6935507cb8514df09bf2676a78447.tar.gz |
llvm_mode: lower llvm version reqs to 3.4 (LLInsTrim will not be
available)
Diffstat (limited to 'llvm_mode/afl-llvm-common.cc')
-rw-r--r-- | llvm_mode/afl-llvm-common.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm_mode/afl-llvm-common.cc b/llvm_mode/afl-llvm-common.cc index db604e14..35eabbf0 100644 --- a/llvm_mode/afl-llvm-common.cc +++ b/llvm_mode/afl-llvm-common.cc @@ -33,7 +33,10 @@ char *getBBName(const llvm::BasicBlock *BB) { std::string Str; raw_string_ostream OS(Str); +#if LLVM_VERSION_MAJOR >= 4 || \ + (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 7) BB->printAsOperand(OS, false); +#endif name = strdup(OS.str().c_str()); return name; @@ -171,7 +174,7 @@ bool isInWhitelist(llvm::Function *F) { #else if (!Loc.isUnknown()) { - DILocation cDILoc(Loc.getAsMDNode(C)); + DILocation cDILoc(Loc.getAsMDNode(F->getContext())); unsigned int instLine = cDILoc.getLineNumber(); StringRef instFilename = cDILoc.getFilename(); |