[llvm] r178365 - Move the construction of the skeleton compile unit after the

Eric Christopher echristo at gmail.com
Wed Apr 17 10:00:50 PDT 2013


On Wed, Apr 17, 2013 at 5:33 AM, David Blaikie <dblaikie at gmail.com> wrote:
>
> On Mar 30, 2013 7:26 AM, "Eric Christopher" <echristo at gmail.com> wrote:
>>
>> Author: echristo
>> Date: Fri Mar 29 15:23:02 2013
>> New Revision: 178365
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=178365&view=rev
>> Log:
>> Move the construction of the skeleton compile unit after the
>> entire original compile unit has been constructed.
>
> Why was this necessary? (& should that necessity be demonstrated with a test
> case?)
>

It was a preparatory commit before adding the support for the dwo_id
computation (which is equivalent to getting a type signature), no
functional change at this point. I meant to have a quick follow on
patch, sorry for the lack of description.

-eric

>>
>> Modified:
>>     llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>>
>> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=178365&r1=178364&r2=178365&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Fri Mar 29 15:23:02
>> 2013
>> @@ -721,13 +721,6 @@ CompileUnit *DwarfDebug::constructCompil
>>    if (!FirstCU)
>>      FirstCU = NewCU;
>>
>> -  if (useSplitDwarf()) {
>> -    // This should be a unique identifier when we want to build .dwp
>> files.
>> -    NewCU->addUInt(Die, dwarf::DW_AT_GNU_dwo_id, dwarf::DW_FORM_data8,
>> 0);
>> -    // Now construct the skeleton CU associated.
>> -    constructSkeletonCU(N);
>> -  }
>> -
>>    InfoHolder.addUnit(NewCU);
>>
>>    CUMap.insert(std::make_pair(N, NewCU));
>> @@ -794,6 +787,14 @@ void DwarfDebug::beginModule() {
>>      DIArray RetainedTypes = CUNode.getRetainedTypes();
>>      for (unsigned i = 0, e = RetainedTypes.getNumElements(); i != e; ++i)
>>        CU->getOrCreateTypeDIE(RetainedTypes.getElement(i));
>> +    // If we're splitting the dwarf out now that we've got the entire
>> +    // CU then construct a skeleton CU based upon it.
>> +    if (useSplitDwarf()) {
>> +    // This should be a unique identifier when we want to build .dwp
>> files.
>> +      CU->addUInt(CU->getCUDie(), dwarf::DW_AT_GNU_dwo_id,
>> dwarf::DW_FORM_data8, 0);
>> +      // Now construct the skeleton CU associated.
>> +      constructSkeletonCU(CUNode);
>> +    }
>>    }
>>
>>    // Tell MMI that we have debug info.
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list