about summary refs log tree commit diff
path: root/llvm_mode/LLVMInsTrim.so.cc
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-08-20 11:00:07 +0200
committerGitHub <noreply@github.com>2020-08-20 11:00:07 +0200
commit572944d7267e3612ef8da17a180bc3d8f1a958a7 (patch)
treed2110370094b94f1ed0b2ece83ed32fb8de86b15 /llvm_mode/LLVMInsTrim.so.cc
parent17d403b8f873bcadf3fc507f9b49fe4bc0dda162 (diff)
parent779d8f6b7e3454fcfd7a43c4cf54d72ea025e67d (diff)
downloadafl++-572944d7267e3612ef8da17a180bc3d8f1a958a7.tar.gz
Merge pull request #514 from AFLplusplus/dev
push to stable
Diffstat (limited to 'llvm_mode/LLVMInsTrim.so.cc')
-rw-r--r--llvm_mode/LLVMInsTrim.so.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm_mode/LLVMInsTrim.so.cc b/llvm_mode/LLVMInsTrim.so.cc
index 206e2682..6b2aaf23 100644
--- a/llvm_mode/LLVMInsTrim.so.cc
+++ b/llvm_mode/LLVMInsTrim.so.cc
@@ -181,10 +181,16 @@ struct InsTrim : public ModulePass {
 
 #ifdef AFL_HAVE_VECTOR_INTRINSICS
     // IntegerType *Int64Ty = IntegerType::getInt64Ty(C);
-    uint64_t     PrevLocVecSize = PowerOf2Ceil(PrevLocSize);
+    int          PrevLocVecSize = PowerOf2Ceil(PrevLocSize);
     IntegerType *IntLocTy =
         IntegerType::getIntNTy(C, sizeof(PREV_LOC_T) * CHAR_BIT);
-    if (ngram_size) PrevLocTy = VectorType::get(IntLocTy, PrevLocVecSize);
+    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