From 4bbcbda302cba8b1b0d88c20d735d09b483bd005 Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 26 Jan 2011 19:15:39 +0000 Subject: Fix some obvious bugs in the conditional-cleanup code and then make the dtor cleanup use it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124309 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGException.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/CodeGen/CGException.cpp') diff --git a/lib/CodeGen/CGException.cpp b/lib/CodeGen/CGException.cpp index 5845f1ec02..58af36a56d 100644 --- a/lib/CodeGen/CGException.cpp +++ b/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); -- cgit v1.2.3-18-g5258