about summary refs log tree commit diff
path: root/instrumentation/cmplog-instructions-pass.cc
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-12-09 14:33:56 +0100
committervanhauser-thc <vh@thc.org>2021-12-09 14:33:56 +0100
commitdb360332c4cf92c3b90d8dfab9292763e677aebf (patch)
treeab1bb8e44a22e36d1b53646a57c10844bf4a6978 /instrumentation/cmplog-instructions-pass.cc
parent4c6d94ea5f854071277ed9729de2d4ef7d07cc84 (diff)
downloadafl++-db360332c4cf92c3b90d8dfab9292763e677aebf.tar.gz
make llvm 14-dev working. again.
Diffstat (limited to 'instrumentation/cmplog-instructions-pass.cc')
-rw-r--r--instrumentation/cmplog-instructions-pass.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/instrumentation/cmplog-instructions-pass.cc b/instrumentation/cmplog-instructions-pass.cc
index 07f80b2c..054caee2 100644
--- a/instrumentation/cmplog-instructions-pass.cc
+++ b/instrumentation/cmplog-instructions-pass.cc
@@ -264,7 +264,11 @@ bool CmpLogInstructions::hookInstrs(Module &M) {
 
       IRBuilder<> IRB2(selectcmpInst->getParent());
       IRB2.SetInsertPoint(selectcmpInst);
-      LoadInst *CmpPtr = IRB2.CreateLoad(AFLCmplogPtr);
+      LoadInst *CmpPtr = IRB2.CreateLoad(
+#if LLVM_VERSION_MAJOR >= 14
+          PointerType::get(Int8Ty, 0),
+#endif
+          AFLCmplogPtr);
       CmpPtr->setMetadata(M.getMDKindID("nosanitize"), MDNode::get(C, None));
       auto is_not_null = IRB2.CreateICmpNE(CmpPtr, Null);
       auto ThenTerm =