From 6ec687d2ad8b4968675f7baec15ba302b4d7e199 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Fri, 11 Dec 2009 01:00:09 +0000 Subject: [PATCH] When extending the lifetime of a temporary, make sure to emit a branch to the cleanup exit block. This fixes a broken module error in LLVMCConfigurationEmitter.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91086 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExpr.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 873c28cdef..0f351be01c 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -138,9 +138,12 @@ RValue CodeGenFunction::EmitReferenceBindingToExpr(const Expr* E, ClassDecl->getDestructor(getContext()); { - DelayedCleanupBlock scope(*this); + DelayedCleanupBlock Scope(*this); EmitCXXDestructorCall(Dtor, Dtor_Complete, Val.getAggregateAddr()); + + // Make sure to jump to the exit block. + EmitBranch(Scope.getCleanupExitBlock()); } if (Exceptions) { EHCleanupBlock Cleanup(*this); -- 2.50.1