summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGException.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-01-26 19:15:39 +0000
committerJohn McCall <rjmccall@apple.com>2011-01-26 19:15:39 +0000
commitf256eb54a2aca83830dd98ecb898c9fc0c99dac5 (patch)
tree314b4f29a4a718e2fca80797092ce7834ffefd64 /clang/lib/CodeGen/CGException.cpp
parent1c7bd7f48145986d99097f6e4220fc25578e13c6 (diff)
downloadbcm5719-llvm-f256eb54a2aca83830dd98ecb898c9fc0c99dac5.tar.gz
bcm5719-llvm-f256eb54a2aca83830dd98ecb898c9fc0c99dac5.zip
Fix some obvious bugs in the conditional-cleanup code and then make the
dtor cleanup use it. llvm-svn: 124309
Diffstat (limited to 'clang/lib/CodeGen/CGException.cpp')
-rw-r--r--clang/lib/CodeGen/CGException.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp
index 5845f1ec026..58af36a56d5 100644
--- a/clang/lib/CodeGen/CGException.cpp
+++ b/clang/lib/CodeGen/CGException.cpp
@@ -179,8 +179,7 @@ llvm::Value *CodeGenFunction::initFullExprCleanup() {
// Initialize it to false at a site that's guaranteed to be run
// before each evaluation.
llvm::BasicBlock *block = OutermostConditional->getStartingBlock();
- new llvm::StoreInst(Builder.getFalse(), run,
- block->getFirstNonPHIOrDbg());
+ new llvm::StoreInst(Builder.getFalse(), run, &block->back());
// Initialize it to true at the current location.
Builder.CreateStore(Builder.getTrue(), run);
OpenPOWER on IntegriCloud