[cfe-commits] r83138 - in /cfe/trunk/lib/CodeGen: CGBlocks.cpp CGDebugInfo.cpp CGDebugInfo.h

Mike Stump mrs at apple.com
Wed Sep 30 11:35:54 PDT 2009


On Sep 30, 2009, at 9:20 AM, Devang Patel wrote:
> You mentioned that this scheme is better. But why ?

One is more general than the other scheme, the other is but an  
instance of the first.  There is no particular advantage to having  
both schemes in llvm from my point of view.  Additionally, it is a  
layer violation for llvm to have to know these details about blocks.

>
>>  There's a bit of simplifications yet to do as well.
>
> It seems this patch has caused additional failures in gdb testsuite
> run.

Yup.

> Please investigate this.

I am.

>> +
>> +  // Save a spot to insert the debug information for all the  
>> BlockDeclRefDecls.
>> +  llvm::BasicBlock *entry = Builder.GetInsertBlock();
>> +  llvm::BasicBlock::iterator entry_ptr = Builder.GetInsertPoint();
>
> Block is heavily overloaded, so please use AppleBlock.  For  
> example.  GetInsertAppleBlock, AppleBlockDeclRefDecls etc..

But that routine has nothing to do with the blocks language feature.

> Again, please use helper functions to handle such repeated patterns.

We won't need a helper as that entire bit of code and the code it was  
copied from goes away.  As I said, this is a work in progress,  
cleanups are scheduled right after the new test failures.



More information about the cfe-commits mailing list