[llvm-commits] [llvm] r62125 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp

Chris Lattner clattner at apple.com
Tue Jan 13 13:46:47 PST 2009


On Jan 13, 2009, at 9:18 AM, Devang Patel wrote:

>
> On Jan 12, 2009, at 11:32 PM, Chris Lattner wrote:
>
>>>   if (!Slot) {
>>>     // FIXME - breaks down when the context is an inlined function.
>>>     DIDescriptor ParentDesc;
>>> -      DIDescriptor *DB = new DIBlock(V);
>>> +      DIDescriptor *DB = new DIDescriptor(V);
>>
>> Why are you 'new'ing these things?  The descriptors are meant to be
>> very light-weight objects that are just handles on existing global
>> variable descriptors.  There should be no reason to new them, just
>> create (through various methods on DIFactory) new global variable
>> descriptors themselves.
>
> Yup. That's what I am doing other places. I'll change this.

Thanks Devang!

-Chris




More information about the llvm-commits mailing list