diff options
author | vanhauser-thc <vh@thc.org> | 2023-02-20 15:43:54 +0100 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2023-02-20 15:43:54 +0100 |
commit | b786558dea5fd5dca471a0e36a8b420ff6a65846 (patch) | |
tree | f7055992a36cc143a00fab61dea7f652cc174432 /instrumentation/cmplog-instructions-pass.cc | |
parent | ebaac23a514cd3950d4a6cb597bd921e13ab9baa (diff) | |
download | afl++-b786558dea5fd5dca471a0e36a8b420ff6a65846.tar.gz |
Revert "LLVM cmplog factoring custom Instruction iterator with added restriction"
This reverts commit 8bc3fa1df286aac46a0a724f64e2e07010d2497e.
Diffstat (limited to 'instrumentation/cmplog-instructions-pass.cc')
-rw-r--r-- | instrumentation/cmplog-instructions-pass.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/instrumentation/cmplog-instructions-pass.cc b/instrumentation/cmplog-instructions-pass.cc index c6fd7c56..bca1f927 100644 --- a/instrumentation/cmplog-instructions-pass.cc +++ b/instrumentation/cmplog-instructions-pass.cc @@ -138,6 +138,21 @@ llvmGetPassPluginInfo() { char CmpLogInstructions::ID = 0; #endif +template <class Iterator> +Iterator Unique(Iterator first, Iterator last) { + + while (first != last) { + + Iterator next(first); + last = std::remove(++next, last, *first); + first = next; + + } + + return last; + +} + bool CmpLogInstructions::hookInstrs(Module &M) { std::vector<Instruction *> icomps; |