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 | 0c6a7d8f42a24674a1ae42261482ac2eaef40284 (patch) | |
tree | 3ebebcf4a332a23f252e54557c31d741bfadb043 | |
parent | 1239de15928a31ba7e7a70e402ffe532ea29db49 (diff) | |
download | bcm5719-llvm-0c6a7d8f42a24674a1ae42261482ac2eaef40284.tar.gz bcm5719-llvm-0c6a7d8f42a24674a1ae42261482ac2eaef40284.zip |
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.
llvm-svn: 91086
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 873c28cdef8..0f351be01c2 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/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); |