about summary refs log tree commit diff
path: root/llvm_mode/afl-llvm-pass.so.cc
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2020-05-15 01:55:33 +0200
committerhexcoder- <heiko@hexco.de>2020-05-15 01:55:33 +0200
commit182b8a4582c6935507cb8514df09bf2676a78447 (patch)
tree95450e277eeaf6e34204538fcfc49e44eb372c03 /llvm_mode/afl-llvm-pass.so.cc
parent97bddc8cfa5920cd4926a69c09db27c55d70be08 (diff)
downloadafl++-182b8a4582c6935507cb8514df09bf2676a78447.tar.gz
llvm_mode: lower llvm version reqs to 3.4 (LLInsTrim will not be
available)
Diffstat (limited to 'llvm_mode/afl-llvm-pass.so.cc')
-rw-r--r--llvm_mode/afl-llvm-pass.so.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm_mode/afl-llvm-pass.so.cc b/llvm_mode/afl-llvm-pass.so.cc
index f58a7a5e..5bf705f8 100644
--- a/llvm_mode/afl-llvm-pass.so.cc
+++ b/llvm_mode/afl-llvm-pass.so.cc
@@ -211,8 +211,15 @@ bool AFLCoverage::runOnModule(Module &M) {
   else
 #else
   if (ngram_size_str)
-    FATAL("Sorry, NGRAM branch coverage is not supported with llvm version %s!",
-          LLVM_VERSION_STRING);
+#ifndef LLVM_VERSION_PATCH
+    FATAL("Sorry, NGRAM branch coverage is not supported with llvm version %d.%d.%d!",
+          LLVM_VERSION_MAJOR, LLVM_VERSION_MINOR,
+          0);
+#else
+    FATAL("Sorry, NGRAM branch coverage is not supported with llvm version %d.%d.%d!",
+          LLVM_VERSION_MAJOR, LLVM_VERSION_MINOR,
+          LLVM_VERSION_PATCH);
+#endif
 #endif
     PrevLocSize = 1;