about summary refs log tree commit diff
path: root/instrumentation/compare-transform-pass.so.cc
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2021-12-13 22:58:19 +0100
committerGitHub <noreply@github.com>2021-12-13 22:58:19 +0100
commit22e2362f0fd5685548696f487639104a0059e3eb (patch)
treef59a3c6d5fb0f42056252f400f3bab1e1010432b /instrumentation/compare-transform-pass.so.cc
parent08ca4d54a55fe73e64a994c41a12af61f52e497e (diff)
parentc6bad07d75aa36671ebc32a722566cb145414b08 (diff)
downloadafl++-22e2362f0fd5685548696f487639104a0059e3eb.tar.gz
Merge pull request #1213 from AFLplusplus/dev
push to stable
Diffstat (limited to 'instrumentation/compare-transform-pass.so.cc')
-rw-r--r--instrumentation/compare-transform-pass.so.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/instrumentation/compare-transform-pass.so.cc b/instrumentation/compare-transform-pass.so.cc
index ef3bd66b..2ced37c5 100644
--- a/instrumentation/compare-transform-pass.so.cc
+++ b/instrumentation/compare-transform-pass.so.cc
@@ -529,8 +529,16 @@ bool CompareTransform::transformCmps(Module &M, const bool processStrcmp,
       IRBuilder<> cur_cmp_IRB(&*(cur_cmp_bb->getFirstInsertionPt()));
 
       Value *v = ConstantInt::get(Int64Ty, i);
-      Value *ele = cur_cmp_IRB.CreateInBoundsGEP(VarStr, v, "empty");
-      Value *load = cur_cmp_IRB.CreateLoad(ele);
+      Value *ele = cur_cmp_IRB.CreateInBoundsGEP(
+#if LLVM_VERSION_MAJOR >= 14
+          Int8Ty,
+#endif
+          VarStr, v, "empty");
+      Value *load = cur_cmp_IRB.CreateLoad(
+#if LLVM_VERSION_MAJOR >= 14
+          Int8Ty,
+#endif
+          ele);
 
       if (isCaseInsensitive) {