summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-12-11 01:00:09 +0000
committerAnders Carlsson <andersca@mac.com>2009-12-11 01:00:09 +0000
commit0c6a7d8f42a24674a1ae42261482ac2eaef40284 (patch)
tree3ebebcf4a332a23f252e54557c31d741bfadb043
parent1239de15928a31ba7e7a70e402ffe532ea29db49 (diff)
downloadbcm5719-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.cpp5
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);
OpenPOWER on IntegriCloud