llvm 8 support

This commit is contained in:
van Hauser
2019-06-01 17:05:51 +02:00
parent aba26ce4b3
commit bf5bd17d2e
2 changed files with 9 additions and 0 deletions

View File

@ -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)
---------------------------

View File

@ -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();