about summary refs log tree commit diff
path: root/llvm_mode/afl-llvm-pass.so.cc
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-08-20 10:56:51 +0200
committervan Hauser <vh@thc.org>2020-08-20 10:56:51 +0200
commit779d8f6b7e3454fcfd7a43c4cf54d72ea025e67d (patch)
treed2110370094b94f1ed0b2ece83ed32fb8de86b15 /llvm_mode/afl-llvm-pass.so.cc
parent322847755a29a01cad61023735377348a822f87e (diff)
downloadafl++-779d8f6b7e3454fcfd7a43c4cf54d72ea025e67d.tar.gz
support current llvm12 changes
Diffstat (limited to 'llvm_mode/afl-llvm-pass.so.cc')
-rw-r--r--llvm_mode/afl-llvm-pass.so.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm_mode/afl-llvm-pass.so.cc b/llvm_mode/afl-llvm-pass.so.cc
index a791d720..0206080f 100644
--- a/llvm_mode/afl-llvm-pass.so.cc
+++ b/llvm_mode/afl-llvm-pass.so.cc
@@ -225,8 +225,14 @@ bool AFLCoverage::runOnModule(Module &M) {
     PrevLocSize = 1;
 
 #ifdef AFL_HAVE_VECTOR_INTRINSICS
-  uint64_t PrevLocVecSize = PowerOf2Ceil(PrevLocSize);
-  if (ngram_size) PrevLocTy = VectorType::get(IntLocTy, PrevLocVecSize);
+  int PrevLocVecSize = PowerOf2Ceil(PrevLocSize);
+  if (ngram_size)
+    PrevLocTy = VectorType::get(IntLocTy, PrevLocVecSize
+  #if LLVM_VERSION_MAJOR >= 12
+                                ,
+                                false
+  #endif
+    );
 #endif
 
   /* Get globals for the SHM region and the previous location. Note that