about summary refs log tree commit diff
path: root/instrumentation/cmplog-instructions-pass.cc
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2024-04-07 09:44:33 +0200
committervanhauser-thc <vh@thc.org>2024-04-07 09:44:33 +0200
commit45603367bfb71948f56715ac88e34c05c0dc0486 (patch)
tree9e2535f8cec6750d9ecfe5d398384fd21c916b97 /instrumentation/cmplog-instructions-pass.cc
parentf7ea0f569fa57e22548c1dc8eaba2903213e496e (diff)
downloadafl++-45603367bfb71948f56715ac88e34c05c0dc0486.tar.gz
fix llvm modules
Diffstat (limited to 'instrumentation/cmplog-instructions-pass.cc')
-rw-r--r--instrumentation/cmplog-instructions-pass.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/instrumentation/cmplog-instructions-pass.cc b/instrumentation/cmplog-instructions-pass.cc
index dc60221e..fe5c2926 100644
--- a/instrumentation/cmplog-instructions-pass.cc
+++ b/instrumentation/cmplog-instructions-pass.cc
@@ -680,13 +680,16 @@ bool CmpLogInstructions::runOnModule(Module &M) {
     printf("Running cmplog-instructions-pass by andreafioraldi@gmail.com\n");
   else
     be_quiet = 1;
-  hookInstrs(M);
+  bool ret = hookInstrs(M);
   verifyModule(M);
 
 #if LLVM_MAJOR >= 11                                /* use new pass manager */
-  return PreservedAnalyses::all();
+  if (ret == false)
+    return PreservedAnalyses::all();
+  else
+    return PreservedAnalyses();
 #else
-  return true;
+  return ret;
 #endif
 
 }