about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorDan Liew <daniel.liew@imperial.ac.uk>2016-10-18 10:41:32 +0100
committerDan Liew <daniel.liew@imperial.ac.uk>2016-10-18 10:41:32 +0100
commite20ba28933119800942757871a1ed5c05f6f388d (patch)
tree4f1c083cf39d34416ac929d5f8468d7a1296f582
parentb816fe6883532500225d8a9102574d832b65f65a (diff)
downloadklee-e20ba28933119800942757871a1ed5c05f6f388d.tar.gz
Fix `-Wmisleading-indentation` warning and also correctly set the
`dirty` flag if we remove `llvm.trap` from the module.
-rw-r--r--lib/Module/IntrinsicCleaner.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Module/IntrinsicCleaner.cpp b/lib/Module/IntrinsicCleaner.cpp
index 54ad7db7..54582e69 100644
--- a/lib/Module/IntrinsicCleaner.cpp
+++ b/lib/Module/IntrinsicCleaner.cpp
@@ -59,8 +59,11 @@ bool IntrinsicCleanerPass::runOnModule(Module &M) {
   for (Module::iterator f = M.begin(), fe = M.end(); f != fe; ++f)
     for (Function::iterator b = f->begin(), be = f->end(); b != be; ++b)
       dirty |= runOnBasicBlock(*b, M);
-    if (Function *Declare = M.getFunction("llvm.trap"))
-      Declare->eraseFromParent();
+
+  if (Function *Declare = M.getFunction("llvm.trap")) {
+    Declare->eraseFromParent();
+    dirty = true;
+  }
   return dirty;
 }