diff options
author | Anders Carlsson <andersca@mac.com> | 2009-12-11 01:00:09 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-12-11 01:00:09 +0000 |
commit | 6ec687d2ad8b4968675f7baec15ba302b4d7e199 (patch) | |
tree | 3576ccd5e0dcefafd7d3e662f1796aaec8223f0c | |
parent | 7fb1464c99c6e2f44ce9f41fd5de9edd15c1e45d (diff) |
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
-rw-r--r-- | lib/CodeGen/CGExpr.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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); |