[cfe-commits] r91086 - /cfe/trunk/lib/CodeGen/CGExpr.cpp

Mike Stump mrs at apple.com
Thu Dec 10 17:16:19 PST 2009


On Dec 10, 2009, at 5:00 PM, Anders Carlsson wrote:
> Author: andersca
> Date: Thu Dec 10 19:00:09 2009
> New Revision: 91086
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=91086&view=rev
> Log:
> 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.

> @@ -138,9 +138,12 @@
>               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 100% of the uses require this, why not just put the creation of the dump in DelayedCleanupBlock?  I think all the other uses that don't yet have a branch, need a branch...



More information about the cfe-commits mailing list