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

Anders Carlsson andersca at mac.com
Thu Dec 10 17:28:09 PST 2009


On Dec 10, 2009, at 5:16 PM, Mike Stump wrote:

> 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...

Yup, I agree. Will fix.

Thanks,
Anders




More information about the cfe-commits mailing list