mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-12 10:08:07 +00:00
llvm_mode little update proposal.
avoiding intrinsics generated by LLVM for the isntrumentation.
This commit is contained in:
@ -156,9 +156,14 @@ bool AFLCoverage::runOnModule(Module &M) {
|
|||||||
|
|
||||||
/* Instrument all the things! */
|
/* Instrument all the things! */
|
||||||
|
|
||||||
|
const char *IntrinsicPrefix = "llvm.";
|
||||||
int inst_blocks = 0;
|
int inst_blocks = 0;
|
||||||
|
|
||||||
for (auto &F : M)
|
for (auto &F : M) {
|
||||||
|
|
||||||
|
auto Fname = F.getName();
|
||||||
|
if (Fname.startswith(IntrinsicPrefix)) continue;
|
||||||
|
|
||||||
for (auto &BB : F) {
|
for (auto &BB : F) {
|
||||||
|
|
||||||
BasicBlock::iterator IP = BB.getFirstInsertionPt();
|
BasicBlock::iterator IP = BB.getFirstInsertionPt();
|
||||||
@ -372,6 +377,7 @@ bool AFLCoverage::runOnModule(Module &M) {
|
|||||||
inst_blocks++;
|
inst_blocks++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Say something nice. */
|
/* Say something nice. */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user