<p dir="ltr"><br>
On Mar 30, 2013 7:26 AM, "Eric Christopher" <<a href="mailto:echristo@gmail.com">echristo@gmail.com</a>> wrote:<br>
><br>
> Author: echristo<br>
> Date: Fri Mar 29 15:23:02 2013<br>
> New Revision: 178365<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=178365&view=rev">http://llvm.org/viewvc/llvm-project?rev=178365&view=rev</a><br>
> Log:<br>
> Move the construction of the skeleton compile unit after the<br>
> entire original compile unit has been constructed.</p>
<p dir="ltr">Why was this necessary? (& should that necessity be demonstrated with a test case?)</p>
<p dir="ltr">><br>
> Modified:<br>
>     llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>
><br>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=178365&r1=178364&r2=178365&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=178365&r1=178364&r2=178365&view=diff</a><br>

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