about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--docs/ChangeLog1
-rw-r--r--llvm_mode/compare-transform-pass.so.cc8
2 files changed, 9 insertions, 0 deletions
diff --git a/docs/ChangeLog b/docs/ChangeLog
index 558bb427..6469db1e 100644
--- a/docs/ChangeLog
+++ b/docs/ChangeLog
@@ -27,6 +27,7 @@ Version ++2.52c (2019-05-28):
     to the AFL schedule, not to the FAST schedule. So nothing changes unless
     you use the new -p option :-) - see docs/power_schedules.txt
   - added afl-system-config script to set all system performance options for fuzzing
+  - llvm_mode support for LLVM 8.0 (thanks to Heiko Eissfeldt for the patch)
 
 
 ---------------------------
diff --git a/llvm_mode/compare-transform-pass.so.cc b/llvm_mode/compare-transform-pass.so.cc
index acca3ff0..5b3494af 100644
--- a/llvm_mode/compare-transform-pass.so.cc
+++ b/llvm_mode/compare-transform-pass.so.cc
@@ -218,7 +218,11 @@ bool CompareTransform::transformCmps(Module &M, const bool processStrcmp, const
     BranchInst::Create(end_bb, next_bb);
     PHINode *PN = PHINode::Create(Int32Ty, constLen + 1, "cmp_phi");
 
+#if __clang_major__ < 8
     TerminatorInst *term = bb->getTerminator();
+#else
+    Instruction *term = bb->getTerminator();
+#endif
     BranchInst::Create(next_bb, bb);
     term->eraseFromParent();
 
@@ -255,7 +259,11 @@ bool CompareTransform::transformCmps(Module &M, const bool processStrcmp, const
         next_bb =  BasicBlock::Create(C, "cmp_added", end_bb->getParent(), end_bb);
         BranchInst::Create(end_bb, next_bb);
 
+#if __clang_major__ < 8
         TerminatorInst *term = cur_bb->getTerminator();
+#else
+        Instruction *term = cur_bb->getTerminator();
+#endif
         Value *icmp = IRB.CreateICmpEQ(isub, ConstantInt::get(Int8Ty, 0));
         IRB.CreateCondBr(icmp, next_bb, end_bb);
         term->eraseFromParent();