about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2016-10-18 21:09:31 +0100
committerGitHub <noreply@github.com>2016-10-18 21:09:31 +0100
commit35f6c2ba53eb0b76ebd7eb2f4a9d6684c9157335 (patch)
tree4f1c083cf39d34416ac929d5f8468d7a1296f582
parentb816fe6883532500225d8a9102574d832b65f65a (diff)
parente20ba28933119800942757871a1ed5c05f6f388d (diff)
downloadklee-35f6c2ba53eb0b76ebd7eb2f4a9d6684c9157335.tar.gz
Merge pull request #484 from delcypher/fix_misleading_indentation
Fix `-Wmisleading-indentation` warning and also correctly set the `dirty` flag 
-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;
 }