diff options
author | Cristian Cadar <c.cadar@imperial.ac.uk> | 2013-10-11 10:34:09 -0700 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2013-10-11 10:34:09 -0700 |
commit | bd233936e40f019e0ab066440dc13398ae6754f6 (patch) | |
tree | 1c1dd6f398eb419434f46ab8085fc4ac00b84cd6 /lib | |
parent | 310ce83f0d04830a0f80c6a98febbfe87195f37d (diff) | |
parent | cff6f244b5d0d378237c0f675f76a8c4f8cc8557 (diff) | |
download | klee-bd233936e40f019e0ab066440dc13398ae6754f6.tar.gz |
Merge pull request #40 from antiAgainst/intrinsic-trap
Bugfix: Remove llvm.trap declaration after cleaning all uses.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Module/IntrinsicCleaner.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Module/IntrinsicCleaner.cpp b/lib/Module/IntrinsicCleaner.cpp index 64a47e1b..56d06d30 100644 --- a/lib/Module/IntrinsicCleaner.cpp +++ b/lib/Module/IntrinsicCleaner.cpp @@ -61,6 +61,8 @@ 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(); return dirty; } @@ -210,9 +212,6 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock &b, Module &M) { ii->eraseFromParent(); - if (Function *Declare = M.getFunction("llvm.trap")) - Declare->eraseFromParent(); - dirty = true; break; } |