diff options
author | van Hauser <vh@thc.org> | 2020-03-10 07:14:42 +0100 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-03-10 07:14:42 +0100 |
commit | 1148a2d0d1ce43ab89e14eefb70bc410726838c4 (patch) | |
tree | 4c2a69940d07cb2fadd8b8a5cbbfdb7f902c8d36 /llvm_mode/LLVMInsTrim.so.cc | |
parent | 38d9aedb26d6c4530763a29fe7695155a21ffbbc (diff) | |
download | afl++-1148a2d0d1ce43ab89e14eefb70bc410726838c4.tar.gz |
document new environment variables and code format
Diffstat (limited to 'llvm_mode/LLVMInsTrim.so.cc')
-rw-r--r-- | llvm_mode/LLVMInsTrim.so.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm_mode/LLVMInsTrim.so.cc b/llvm_mode/LLVMInsTrim.so.cc index 0fddad24..229d7d24 100644 --- a/llvm_mode/LLVMInsTrim.so.cc +++ b/llvm_mode/LLVMInsTrim.so.cc @@ -54,7 +54,7 @@ struct InsTrim : public ModulePass { protected: std::list<std::string> myWhitelist; - uint32_t function_minimum_size = 1; + uint32_t function_minimum_size = 1; private: std::mt19937 generator; @@ -387,15 +387,18 @@ struct InsTrim : public ModulePass { } - if (function_minimum_size < 2) { + if (function_minimum_size < 2) { + for (BasicBlock &BB : F) { - if (MS.find(&BB) == MS.end()) { - continue; - } + + if (MS.find(&BB) == MS.end()) { continue; } IRBuilder<> IRB(&*BB.getFirstInsertionPt()); IRB.CreateStore(ConstantInt::get(Int32Ty, genLabel()), OldPrev); + } + } + } for (BasicBlock &BB : F) { |