<div dir="ltr">Should be fixed in r349528  - thanks for identifying this!</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 18, 2018 at 10:54 AM David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">And... I was running an old clang built from before this change (usually I do a check-all often enough that my clang-tot is pretty up to date).<br><br>Looking into this</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 18, 2018 at 8:51 AM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks for letting me know, Pavel!<br><br>Looking into this now, and my first attempt at reproducing this didn't seem to show the behavior you're seeing (& indeed if it had done so across the board I'd expect we would've seen some other test failures). Perhaps there are some other parameters being passed I would need to use to reproduce this?<br><br><font face="monospace">$ clang++-tot -v -gsplit-dwarf test.cpp -c && llvm-dwarfdump-tot test.dwo<br>clang version 8.0.0 (trunk 349415) (llvm/trunk 349196)<br>...<br></font><div><font face="monospace">test.dwo:       file format ELF64-x86-64</font></div><div><font face="monospace"><br></font></div><div><font face="monospace">.debug_info.dwo contents:</font></div><div><font face="monospace">0x00000000: Compile Unit: length = 0x00000044 version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000048)</font></div><div><font face="monospace"><br></font></div><div><font face="monospace">0x0000000b: DW_TAG_compile_unit</font></div><div><font face="monospace">              DW_AT_GNU_dwo_name        ("test.dwo")</font></div><div><font face="monospace">              DW_AT_producer    ("clang version 8.0.0 (trunk 349415) (llvm/trunk 349196)")</font></div><div><font face="monospace">              DW_AT_language    (DW_LANG_C_plus_plus)</font></div><div><font face="monospace">              DW_AT_name        ("test.cpp")</font></div><div><font face="monospace">              DW_AT_GNU_dwo_id  (0xe9ee94e9755dc4ee)</font></div><div><font face="monospace">0x00000019:   DW_TAG_namespace</font></div><div><font face="monospace">                DW_AT_name      ("ns1")</font></div><div><font face="monospace">0x0000001b:     DW_TAG_variable</font></div><div><font face="monospace">                  DW_AT_name    ("value")</font></div><div><font face="monospace">                  DW_AT_type    (0x00000028 "int")</font></div><div><font face="monospace">                  DW_AT_external        (true)</font></div><div><font face="monospace">                  DW_AT_decl_file       (0x01)</font></div><div><font face="monospace">                  DW_AT_decl_line       (4)</font></div><div><font face="monospace">                  DW_AT_location        (DW_OP_GNU_addr_index 0x0)</font></div><div><font face="monospace">                  DW_AT_linkage_name    ("_ZN3ns15valueE")</font></div><div><font face="monospace">0x00000027:     NULL</font></div><div><font face="monospace">0x00000028:   DW_TAG_base_type</font></div><div><font face="monospace">                DW_AT_name      ("int")</font></div><div><font face="monospace">                DW_AT_encoding  (DW_ATE_signed)</font></div><div><font face="monospace">                DW_AT_byte_size (0x04)</font></div></div><div dir="ltr"><div><font face="monospace">0x0000002c:   DW_TAG_subprogram</font></div><div><font face="monospace">                DW_AT_low_pc    ( indexed (00000001) address = <no .debug_addr section>)</font></div><div><font face="monospace">                DW_AT_high_pc   (0x00000017)</font></div><div><font face="monospace">                DW_AT_frame_base        (DW_OP_reg6 RBP)</font></div><div><font face="monospace">                DW_AT_linkage_name      ("_Z4testv")</font></div><div><font face="monospace">                DW_AT_name      ("test")</font></div><div><font face="monospace">                DW_AT_decl_file (0x01)</font></div><div><font face="monospace">                DW_AT_decl_line (7)</font></div><div><font face="monospace">                DW_AT_external  (true)</font></div><div><font face="monospace">0x00000038:     DW_TAG_lexical_block</font></div><div><font face="monospace">                  DW_AT_low_pc  ( indexed (00000002) address = <no .debug_addr section>)</font></div><div><font face="monospace">                  DW_AT_high_pc (0x0000000c)</font></div><div><font face="monospace">0x0000003e:       DW_TAG_imported_module</font></div><div><font face="monospace">                    DW_AT_decl_file     (0x01)</font></div><div><font face="monospace">                    DW_AT_decl_line     (9)</font></div></div><div dir="ltr"><div><font face="monospace">                    DW_AT_import        (0x00000019)</font></div><div><font face="monospace">0x00000045:       NULL</font></div><div><font face="monospace">0x00000046:     NULL</font></div><div><font face="monospace">0x00000047:   NULL</font></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 18, 2018 at 4:38 AM Pavel Labath <<a href="mailto:labath@google.com" target="_blank">labath@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello David,<br>
<br>
I think this patch had some unintended side effect on the DWO<br>
generation. The effect of it is missing block scope information in<br>
some DWO files. The simplest reproducer I have is this file:<br>
<br>
=====<br>
void print(int);<br>
<br>
namespace ns1 {<br>
int value = 100;<br>
}<br>
<br>
void test() {<br>
     do {<br>
         using namespace ns1;<br>
         print(value);<br>
     } while(0);<br>
}<br>
=====<br>
<br>
Compiling this (with -gsplit-dwarf) after this patch produces the<br>
following DWARF in the dwo file:<br>
=====<br>
0x0000002c:   DW_TAG_subprogram<br>
                 DW_AT_low_pc   ( indexed (00000001) address = <no<br>
.debug_addr section>)<br>
                 DW_AT_high_pc  (0x00000017)<br>
                 DW_AT_frame_base       (DW_OP_reg6 RBP)<br>
                 DW_AT_linkage_name     ("_Z4testv")<br>
                 DW_AT_name     ("test")<br>
                 DW_AT_decl_file        (0x01)<br>
                 DW_AT_decl_line        (7)<br>
                 DW_AT_external (true)<br>
=====<br>
Notice how the information about the blocks and their scopes is<br>
missing from the dwo file. After reverting this patch, I get the<br>
expected lexical_block and imported_module tags.<br>
=====<br>
0x0000002c:   DW_TAG_subprogram<br>
                 DW_AT_low_pc   ( indexed (00000001) address = <no<br>
.debug_addr section>)<br>
                 DW_AT_high_pc  (0x00000017)<br>
                 DW_AT_frame_base       (DW_OP_reg6 RBP)<br>
                 DW_AT_linkage_name     ("_Z4testv")<br>
                 DW_AT_name     ("test")<br>
                 DW_AT_decl_file        (0x01)<br>
                 DW_AT_decl_line        (7)<br>
                 DW_AT_external (true)<br>
<br>
0x00000038:     DW_TAG_lexical_block<br>
                   DW_AT_low_pc ( indexed (00000002) address = <no<br>
.debug_addr section>)<br>
                   DW_AT_high_pc        (0x0000000c)<br>
<br>
0x0000003e:       DW_TAG_imported_module<br>
                     DW_AT_decl_file    (0x01)<br>
                     DW_AT_decl_line    (9)<br>
                     DW_AT_import       (cu + 0x0019)<br>
<br>
0x00000045:       NULL<br>
=====<br>
<br>
I found this because some of the tests in the lldb test suite started<br>
failing after this patch, but unfortunately I don't have a good bot I<br>
could point you at this point.<br>
<br>
Could you please check this out?<br>
<br>
thanks,<br>
pavel<br>
<br>
<br>
<br>
On Mon, 17 Dec 2018 at 22:14, David Blaikie via llvm-commits<br>
<<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
><br>
> Fixed in r349395<br>
><br>
> On Mon, Dec 17, 2018 at 1:11 PM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
>><br>
>> Thanks Galina - looking into it!<br>
>><br>
>> On Mon, Dec 17, 2018 at 12:43 PM Galina Kistanova <<a href="mailto:gkistanova@gmail.com" target="_blank">gkistanova@gmail.com</a>> wrote:<br>
>>><br>
>>> Hello David,<br>
>>><br>
>>> It looks like this commit broke test to couple lto builders:<br>
>>> The builders were already broken on build step and did not reach test steps. And did not send notifications also on this.<br>
>>><br>
>>> <a href="http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu" rel="noreferrer" target="_blank">http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu</a><br>
>>> <a href="http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu" rel="noreferrer" target="_blank">http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu</a><br>
>>> . . .<br>
>>> Failing Tests (1):<br>
>>>     LLVM :: tools/gold/X86/split-dwarf.ll<br>
>>><br>
>>> Please have a look?<br>
>>><br>
>>> Thanks<br>
>>><br>
>>><br>
>>> Galina<br>
>>><br>
>>> On Fri, Dec 14, 2018 at 2:47 PM David Blaikie via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
>>>><br>
>>>> Author: dblaikie<br>
>>>> Date: Fri Dec 14 14:44:46 2018<br>
>>>> New Revision: 349207<br>
>>>><br>
>>>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=349207&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=349207&view=rev</a><br>
>>>> Log:<br>
>>>> DebugInfo: Avoid using split DWARF when the split unit would be empty.<br>
>>>><br>
>>>> In ThinLTO many split CUs may be effectively empty because of the lack<br>
>>>> of support for cross-unit references in split DWARF.<br>
>>>><br>
>>>> Using a split unit in those cases is just a waste/overhead - and turned<br>
>>>> out to be one contributor to a significant symbolizer performance issue<br>
>>>> when global variable debug info was being imported (see r348416 for the<br>
>>>> primary fix) due to symbolizers seeing CUs with no ranges, assuming<br>
>>>> there might still be addresses covered and walking into the split CU to<br>
>>>> see if there are any ranges (when that split CU was in a DWP file, that<br>
>>>> meant loading the DWP and its index, the index was extra large because<br>
>>>> of all these fractured/empty CUs... and so was very expensive to load).<br>
>>>><br>
>>>> (the 3rd fix which will follow, is to assume that a CU with no ranges is<br>
>>>> empty rather than merely missing its CU level range data - and to not<br>
>>>> walk into its DIEs (split or otherwise) in search of address information<br>
>>>> that is generally not present)<br>
>>>><br>
>>>> Modified:<br>
>>>>     llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>
>>>>     llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h<br>
>>>>     llvm/trunk/lib/CodeGen/AsmPrinter/DwarfFile.cpp<br>
>>>>     llvm/trunk/test/DebugInfo/X86/fission-cu.ll<br>
>>>>     llvm/trunk/test/DebugInfo/X86/fission-ranges.ll<br>
>>>>     llvm/trunk/test/DebugInfo/X86/string-offsets-table-order.ll<br>
>>>>     llvm/trunk/test/DebugInfo/X86/string-offsets-table.ll<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=349207&r1=349206&r2=349207&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=349207&r1=349206&r2=349207&view=diff</a><br>
>>>> ==============================================================================<br>
>>>> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)<br>
>>>> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Fri Dec 14 14:44:46 2018<br>
>>>> @@ -568,25 +568,10 @@ void DwarfDebug::addGnuPubAttributes(Dwa<br>
>>>>    U.addFlag(D, dwarf::DW_AT_GNU_pubnames);<br>
>>>>  }<br>
>>>><br>
>>>> -// Create new DwarfCompileUnit for the given metadata node with tag<br>
>>>> -// DW_TAG_compile_unit.<br>
>>>> -DwarfCompileUnit &<br>
>>>> -DwarfDebug::getOrCreateDwarfCompileUnit(const DICompileUnit *DIUnit) {<br>
>>>> -  if (auto *CU = CUMap.lookup(DIUnit))<br>
>>>> -    return *CU;<br>
>>>> -  StringRef FN = DIUnit->getFilename();<br>
>>>> -  CompilationDir = DIUnit->getDirectory();<br>
>>>> -<br>
>>>> -  auto OwnedUnit = llvm::make_unique<DwarfCompileUnit>(<br>
>>>> -      InfoHolder.getUnits().size(), DIUnit, Asm, this, &InfoHolder);<br>
>>>> -  DwarfCompileUnit &NewCU = *OwnedUnit;<br>
>>>> +void DwarfDebug::finishUnitAttributes(const DICompileUnit *DIUnit,<br>
>>>> +                                      DwarfCompileUnit &NewCU) {<br>
>>>>    DIE &Die = NewCU.getUnitDie();<br>
>>>> -  InfoHolder.addUnit(std::move(OwnedUnit));<br>
>>>> -  if (useSplitDwarf()) {<br>
>>>> -    NewCU.setSkeleton(constructSkeletonCU(NewCU));<br>
>>>> -    NewCU.addString(Die, dwarf::DW_AT_GNU_dwo_name,<br>
>>>> -                  Asm->TM.Options.MCOptions.SplitDwarfFile);<br>
>>>> -  }<br>
>>>> +  StringRef FN = DIUnit->getFilename();<br>
>>>><br>
>>>>    for (auto *IE : DIUnit->getImportedEntities())<br>
>>>>      NewCU.addImportedEntity(IE);<br>
>>>> @@ -640,11 +625,6 @@ DwarfDebug::getOrCreateDwarfCompileUnit(<br>
>>>>                      dwarf::DW_FORM_data1, RVer);<br>
>>>>    }<br>
>>>><br>
>>>> -  if (useSplitDwarf())<br>
>>>> -    NewCU.setSection(Asm->getObjFileLowering().getDwarfInfoDWOSection());<br>
>>>> -  else<br>
>>>> -    NewCU.setSection(Asm->getObjFileLowering().getDwarfInfoSection());<br>
>>>> -<br>
>>>>    if (DIUnit->getDWOId()) {<br>
>>>>      // This CU is either a clang module DWO or a skeleton CU.<br>
>>>>      NewCU.addUInt(Die, dwarf::DW_AT_GNU_dwo_id, dwarf::DW_FORM_data8,<br>
>>>> @@ -654,9 +634,31 @@ DwarfDebug::getOrCreateDwarfCompileUnit(<br>
>>>>        NewCU.addString(Die, dwarf::DW_AT_GNU_dwo_name,<br>
>>>>                        DIUnit->getSplitDebugFilename());<br>
>>>>    }<br>
>>>> +}<br>
>>>> +// Create new DwarfCompileUnit for the given metadata node with tag<br>
>>>> +// DW_TAG_compile_unit.<br>
>>>> +DwarfCompileUnit &<br>
>>>> +DwarfDebug::getOrCreateDwarfCompileUnit(const DICompileUnit *DIUnit) {<br>
>>>> +  if (auto *CU = CUMap.lookup(DIUnit))<br>
>>>> +    return *CU;<br>
>>>> +<br>
>>>> +  CompilationDir = DIUnit->getDirectory();<br>
>>>> +<br>
>>>> +  auto OwnedUnit = llvm::make_unique<DwarfCompileUnit>(<br>
>>>> +      InfoHolder.getUnits().size(), DIUnit, Asm, this, &InfoHolder);<br>
>>>> +  DwarfCompileUnit &NewCU = *OwnedUnit;<br>
>>>> +  InfoHolder.addUnit(std::move(OwnedUnit));<br>
>>>> +<br>
>>>> +  if (useSplitDwarf()) {<br>
>>>> +    NewCU.setSkeleton(constructSkeletonCU(NewCU));<br>
>>>> +    NewCU.setSection(Asm->getObjFileLowering().getDwarfInfoDWOSection());<br>
>>>> +  } else {<br>
>>>> +    finishUnitAttributes(DIUnit, NewCU);<br>
>>>> +    NewCU.setSection(Asm->getObjFileLowering().getDwarfInfoSection());<br>
>>>> +  }<br>
>>>><br>
>>>>    CUMap.insert({DIUnit, &NewCU});<br>
>>>> -  CUDieMap.insert({&Die, &NewCU});<br>
>>>> +  CUDieMap.insert({&NewCU.getUnitDie(), &NewCU});<br>
>>>>    return NewCU;<br>
>>>>  }<br>
>>>><br>
>>>> @@ -851,7 +853,12 @@ void DwarfDebug::finalizeModuleInfo() {<br>
>>>>      // If we're splitting the dwarf out now that we've got the entire<br>
>>>>      // CU then add the dwo id to it.<br>
>>>>      auto *SkCU = TheCU.getSkeleton();<br>
>>>> -    if (useSplitDwarf()) {<br>
>>>> +    if (useSplitDwarf() && !empty(TheCU.getUnitDie().children())) {<br>
>>>> +      finishUnitAttributes(TheCU.getCUNode(), TheCU);<br>
>>>> +      TheCU.addString(TheCU.getUnitDie(), dwarf::DW_AT_GNU_dwo_name,<br>
>>>> +                      Asm->TM.Options.MCOptions.SplitDwarfFile);<br>
>>>> +      SkCU->addString(SkCU->getUnitDie(), dwarf::DW_AT_GNU_dwo_name,<br>
>>>> +                      Asm->TM.Options.MCOptions.SplitDwarfFile);<br>
>>>>        // Emit a unique identifier for this CU.<br>
>>>>        uint64_t ID =<br>
>>>>            DIEHash(Asm).computeCUSignature(DWOName, TheCU.getUnitDie());<br>
>>>> @@ -870,6 +877,8 @@ void DwarfDebug::finalizeModuleInfo() {<br>
>>>>          SkCU->addSectionLabel(SkCU->getUnitDie(), dwarf::DW_AT_GNU_ranges_base,<br>
>>>>                                Sym, Sym);<br>
>>>>        }<br>
>>>> +    } else if (SkCU) {<br>
>>>> +      finishUnitAttributes(SkCU->getCUNode(), *SkCU);<br>
>>>>      }<br>
>>>><br>
>>>>      // If we have code split among multiple sections or non-contiguous<br>
>>>> @@ -882,7 +891,9 @@ void DwarfDebug::finalizeModuleInfo() {<br>
>>>><br>
>>>>      // We don't keep track of which addresses are used in which CU so this<br>
>>>>      // is a bit pessimistic under LTO.<br>
>>>> -    if (!AddrPool.isEmpty())<br>
>>>> +    if (!AddrPool.isEmpty() &&<br>
>>>> +        (getDwarfVersion() >= 5 ||<br>
>>>> +         (SkCU && !empty(TheCU.getUnitDie().children()))))<br>
>>>>        U.addAddrTableBase();<br>
>>>><br>
>>>>      if (unsigned NumRanges = TheCU.getRanges().size()) {<br>
>>>> @@ -2483,8 +2494,6 @@ void DwarfDebug::emitDebugMacinfo() {<br>
>>>><br>
>>>>  void DwarfDebug::initSkeletonUnit(const DwarfUnit &U, DIE &Die,<br>
>>>>                                    std::unique_ptr<DwarfCompileUnit> NewU) {<br>
>>>> -  NewU->addString(Die, dwarf::DW_AT_GNU_dwo_name,<br>
>>>> -                  Asm->TM.Options.MCOptions.SplitDwarfFile);<br>
>>>><br>
>>>>    if (!CompilationDir.empty())<br>
>>>>      NewU->addString(Die, dwarf::DW_AT_comp_dir, CompilationDir);<br>
>>>><br>
>>>> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h<br>
>>>> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=349207&r1=349206&r2=349207&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=349207&r1=349206&r2=349207&view=diff</a><br>
>>>> ==============================================================================<br>
>>>> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h (original)<br>
>>>> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h Fri Dec 14 14:44:46 2018<br>
>>>> @@ -540,6 +540,8 @@ class DwarfDebug : public DebugHandlerBa<br>
>>>>    /// Create new DwarfCompileUnit for the given metadata node with tag<br>
>>>>    /// DW_TAG_compile_unit.<br>
>>>>    DwarfCompileUnit &getOrCreateDwarfCompileUnit(const DICompileUnit *DIUnit);<br>
>>>> +  void finishUnitAttributes(const DICompileUnit *DIUnit,<br>
>>>> +                            DwarfCompileUnit &NewCU);<br>
>>>><br>
>>>>    /// Construct imported_module or imported_declaration DIE.<br>
>>>>    void constructAndAddImportedEntityDIE(DwarfCompileUnit &TheCU,<br>
>>>><br>
>>>> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfFile.cpp<br>
>>>> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfFile.cpp?rev=349207&r1=349206&r2=349207&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfFile.cpp?rev=349207&r1=349206&r2=349207&view=diff</a><br>
>>>> ==============================================================================<br>
>>>> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfFile.cpp (original)<br>
>>>> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfFile.cpp Fri Dec 14 14:44:46 2018<br>
>>>> @@ -39,13 +39,14 @@ void DwarfFile::emitUnit(DwarfUnit *TheU<br>
>>>>    if (TheU->getCUNode()->isDebugDirectivesOnly())<br>
>>>>      return;<br>
>>>><br>
>>>> -  DIE &Die = TheU->getUnitDie();<br>
>>>> -  MCSection *USection = TheU->getSection();<br>
>>>> -  Asm->OutStreamer->SwitchSection(USection);<br>
>>>> +  MCSection *S = TheU->getSection();<br>
>>>><br>
>>>> -  TheU->emitHeader(UseOffsets);<br>
>>>> +  if (!S)<br>
>>>> +    return;<br>
>>>><br>
>>>> -  Asm->emitDwarfDIE(Die);<br>
>>>> +  Asm->OutStreamer->SwitchSection(S);<br>
>>>> +  TheU->emitHeader(UseOffsets);<br>
>>>> +  Asm->emitDwarfDIE(TheU->getUnitDie());<br>
>>>>  }<br>
>>>><br>
>>>>  // Compute the size and offset for each DIE.<br>
>>>><br>
>>>> Modified: llvm/trunk/test/DebugInfo/X86/fission-cu.ll<br>
>>>> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/fission-cu.ll?rev=349207&r1=349206&r2=349207&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/fission-cu.ll?rev=349207&r1=349206&r2=349207&view=diff</a><br>
>>>> ==============================================================================<br>
>>>> --- llvm/trunk/test/DebugInfo/X86/fission-cu.ll (original)<br>
>>>> +++ llvm/trunk/test/DebugInfo/X86/fission-cu.ll Fri Dec 14 14:44:46 2018<br>
>>>> @@ -25,18 +25,18 @@ source_filename = "test/DebugInfo/X86/fi<br>
>>>>  ; CHECK: Abbrev table for offset: 0x00000000<br>
>>>>  ; CHECK: [1] DW_TAG_compile_unit DW_CHILDREN_no<br>
>>>>  ; CHECK: DW_AT_stmt_list DW_FORM_sec_offset<br>
>>>> -; CHECK: DW_AT_GNU_dwo_name      DW_FORM_strp<br>
>>>>  ; CHECK: DW_AT_comp_dir  DW_FORM_strp<br>
>>>> +; CHECK: DW_AT_GNU_dwo_name      DW_FORM_strp<br>
>>>>  ; CHECK: DW_AT_GNU_dwo_id        DW_FORM_data8<br>
>>>><br>
>>>>  ; Check that we're using the right forms.<br>
>>>>  ; CHECK: .debug_abbrev.dwo contents:<br>
>>>>  ; CHECK: Abbrev table for offset: 0x00000000<br>
>>>>  ; CHECK: [1] DW_TAG_compile_unit DW_CHILDREN_yes<br>
>>>> -; CHECK: DW_AT_GNU_dwo_name  DW_FORM_GNU_str_index<br>
>>>>  ; CHECK: DW_AT_producer  DW_FORM_GNU_str_index<br>
>>>>  ; CHECK: DW_AT_language  DW_FORM_data2<br>
>>>>  ; CHECK: DW_AT_name      DW_FORM_GNU_str_index<br>
>>>> +; CHECK: DW_AT_GNU_dwo_name  DW_FORM_GNU_str_index<br>
>>>>  ; CHECK-NOT: DW_AT_low_pc<br>
>>>>  ; CHECK-NOT: DW_AT_stmt_list<br>
>>>>  ; CHECK-NOT: DW_AT_comp_dir<br>
>>>> @@ -58,48 +58,48 @@ source_filename = "test/DebugInfo/X86/fi<br>
>>>>  ; CHECK: .debug_info contents:<br>
>>>>  ; CHECK: DW_TAG_compile_unit<br>
>>>>  ; CHECK-NEXT: DW_AT_stmt_list [DW_FORM_sec_offset]   (0x00000000)<br>
>>>> -; CHECK-NEXT: DW_AT_GNU_dwo_name [DW_FORM_strp] ( .debug_str[0x00000000] = "baz.dwo")<br>
>>>> -; CHECK-NEXT: DW_AT_comp_dir [DW_FORM_strp]     ( .debug_str[0x00000008] = "/usr/local/google/home/echristo/tmp")<br>
>>>> +; CHECK-NEXT: DW_AT_comp_dir [DW_FORM_strp]     ( .debug_str[0x00000000] = "/usr/local/google/home/echristo/tmp")<br>
>>>> +; CHECK-NEXT: DW_AT_GNU_dwo_name [DW_FORM_strp] ( .debug_str[0x00000024] = "baz.dwo")<br>
>>>>  ; CHECK-NEXT: DW_AT_GNU_dwo_id [DW_FORM_data8]  (0x1f1f859683d49324)<br>
>>>><br>
>>>>  ; Check that the rest of the compile units have information.<br>
>>>>  ; CHECK: .debug_info.dwo contents:<br>
>>>>  ; CHECK: DW_TAG_compile_unit<br>
>>>> -; CHECK: DW_AT_GNU_dwo_name [DW_FORM_GNU_str_index] ( indexed (00000000) string = "baz.dwo")<br>
>>>> -; CHECK: DW_AT_producer [DW_FORM_GNU_str_index] ( indexed (00000001) string = "clang version 3.3 (trunk 169021) (llvm/trunk 169020)")<br>
>>>> +; CHECK: DW_AT_producer [DW_FORM_GNU_str_index] ( indexed (00000002) string = "clang version 3.3 (trunk 169021) (llvm/trunk 169020)")<br>
>>>>  ; CHECK: DW_AT_language [DW_FORM_data2]        (DW_LANG_C99)<br>
>>>> -; CHECK: DW_AT_name [DW_FORM_GNU_str_index]    ( indexed (00000002) string = "baz.c")<br>
>>>> +; CHECK: DW_AT_name [DW_FORM_GNU_str_index]    ( indexed (00000003) string = "baz.c")<br>
>>>> +; CHECK: DW_AT_GNU_dwo_name [DW_FORM_GNU_str_index] ( indexed (00000004) string = "baz.dwo")<br>
>>>>  ; CHECK-NOT: DW_AT_low_pc<br>
>>>>  ; CHECK-NOT: DW_AT_stmt_list<br>
>>>>  ; CHECK-NOT: DW_AT_comp_dir<br>
>>>>  ; CHECK: DW_AT_GNU_dwo_id [DW_FORM_data8]  (0x1f1f859683d49324)<br>
>>>>  ; CHECK: DW_TAG_variable<br>
>>>> -; CHECK: DW_AT_name [DW_FORM_GNU_str_index]     ( indexed (00000003) string = "a")<br>
>>>> +; CHECK: DW_AT_name [DW_FORM_GNU_str_index]     ( indexed (00000000) string = "a")<br>
>>>>  ; CHECK: DW_AT_type [DW_FORM_ref4]       (cu + 0x{{[0-9a-f]*}} => {[[TYPE:0x[0-9a-f]*]]}<br>
>>>>  ; CHECK: DW_AT_external [DW_FORM_flag_present]   (true)<br>
>>>>  ; CHECK: DW_AT_decl_file [DW_FORM_data1] (0x01)<br>
>>>>  ; CHECK: DW_AT_decl_line [DW_FORM_data1] (1)<br>
>>>>  ; CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_GNU_addr_index 0x0)<br>
>>>>  ; CHECK: [[TYPE]]: DW_TAG_base_type<br>
>>>> -; CHECK: DW_AT_name [DW_FORM_GNU_str_index]     ( indexed (00000004) string = "int")<br>
>>>> +; CHECK: DW_AT_name [DW_FORM_GNU_str_index]     ( indexed (00000001) string = "int")<br>
>>>><br>
>>>>  ; CHECK: .debug_str contents:<br>
>>>> -; CHECK: 0x00000000: "baz.dwo"<br>
>>>> -; CHECK: 0x00000008: "/usr/local/google/home/echristo/tmp"<br>
>>>> +; CHECK: 0x00000000: "/usr/local/google/home/echristo/tmp"<br>
>>>> +; CHECK: 0x00000024: "baz.dwo"<br>
>>>><br>
>>>>  ; CHECK: .debug_str.dwo contents:<br>
>>>> -; CHECK: 0x00000000: "baz.dwo"<br>
>>>> -; CHECK: 0x00000008: "clang version 3.3 (trunk 169021) (llvm/trunk 169020)"<br>
>>>> -; CHECK: 0x0000003d: "baz.c"<br>
>>>> -; CHECK: 0x00000043: "a"<br>
>>>> -; CHECK: 0x00000045: "int"<br>
>>>> +; CHECK: 0x00000000: "a"<br>
>>>> +; CHECK: 0x00000002: "int"<br>
>>>> +; CHECK: 0x00000006: "clang version 3.3 (trunk 169021) (llvm/trunk 169020)"<br>
>>>> +; CHECK: 0x0000003b: "baz.c"<br>
>>>> +; CHECK: 0x00000041: "baz.dwo"<br>
>>>><br>
>>>>  ; CHECK: .debug_str_offsets.dwo contents:<br>
>>>>  ; CHECK: 0x00000000: 00000000<br>
>>>> -; CHECK: 0x00000004: 00000008<br>
>>>> -; CHECK: 0x00000008: 0000003d<br>
>>>> -; CHECK: 0x0000000c: 00000043<br>
>>>> -; CHECK: 0x00000010: 00000045<br>
>>>> +; CHECK: 0x00000004: 00000002<br>
>>>> +; CHECK: 0x00000008: 00000006<br>
>>>> +; CHECK: 0x0000000c: 0000003b<br>
>>>> +; CHECK: 0x00000010: 00000041<br>
>>>><br>
>>>>  ; Object file checks<br>
>>>>  ; For x86-64-linux we should have this set of relocations for the debug info section<br>
>>>><br>
>>>> Modified: llvm/trunk/test/DebugInfo/X86/fission-ranges.ll<br>
>>>> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/fission-ranges.ll?rev=349207&r1=349206&r2=349207&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/fission-ranges.ll?rev=349207&r1=349206&r2=349207&view=diff</a><br>
>>>> ==============================================================================<br>
>>>> --- llvm/trunk/test/DebugInfo/X86/fission-ranges.ll (original)<br>
>>>> +++ llvm/trunk/test/DebugInfo/X86/fission-ranges.ll Fri Dec 14 14:44:46 2018<br>
>>>> @@ -8,8 +8,8 @@<br>
>>>>  ; CHECK: .debug_info contents:<br>
>>>>  ; CHECK: DW_TAG_compile_unit<br>
>>>>  ; CHECK-NEXT: DW_AT_stmt_list<br>
>>>> -; CHECK-NEXT: DW_AT_GNU_dwo_name<br>
>>>>  ; CHECK-NEXT: DW_AT_comp_dir<br>
>>>> +; CHECK-NEXT: DW_AT_GNU_dwo_name<br>
>>>>  ; CHECK-NEXT: DW_AT_GNU_dwo_id<br>
>>>>  ; CHECK-NEXT: DW_AT_GNU_ranges_base<br>
>>>>  ; CHECK-NEXT: DW_AT_GNU_addr_base [DW_FORM_sec_offset]                   (0x00000000)<br>
>>>><br>
>>>> Modified: llvm/trunk/test/DebugInfo/X86/string-offsets-table-order.ll<br>
>>>> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/string-offsets-table-order.ll?rev=349207&r1=349206&r2=349207&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/string-offsets-table-order.ll?rev=349207&r1=349206&r2=349207&view=diff</a><br>
>>>> ==============================================================================<br>
>>>> --- llvm/trunk/test/DebugInfo/X86/string-offsets-table-order.ll (original)<br>
>>>> +++ llvm/trunk/test/DebugInfo/X86/string-offsets-table-order.ll Fri Dec 14 14:44:46 2018<br>
>>>> @@ -13,11 +13,11 @@<br>
>>>><br>
>>>>  ; CHECK: .debug_info contents:<br>
>>>>  ; CHECK:   DW_TAG_compile_unit<br>
>>>> -; CHECK:     DW_AT_comp_dir [DW_FORM_strx1] ( indexed (00000001) string = "X3")<br>
>>>> +; CHECK:     DW_AT_comp_dir [DW_FORM_strx1] ( indexed (00000000) string = "X3")<br>
>>>>  ; CHECK:   DW_TAG_compile_unit<br>
>>>> -; CHECK:     DW_AT_comp_dir [DW_FORM_strx1] ( indexed (00000002) string = "X2")<br>
>>>> +; CHECK:     DW_AT_comp_dir [DW_FORM_strx1] ( indexed (00000001) string = "X2")<br>
>>>>  ; CHECK:   DW_TAG_compile_unit<br>
>>>> -; CHECK:     DW_AT_comp_dir [DW_FORM_strx1] ( indexed (00000003) string = "X1")<br>
>>>> +; CHECK:     DW_AT_comp_dir [DW_FORM_strx1] ( indexed (00000002) string = "X1")<br>
>>>>  ; CHECK: .debug_info.dwo contents:<br>
>>>><br>
>>>>  ; CHECK: .debug_str contents:<br>
>>>> @@ -27,10 +27,10 @@<br>
>>>><br>
>>>>  ; CHECK: .debug_str_offsets contents:<br>
>>>>  ; CHECK: Format = DWARF32, Version = 5<br>
>>>> -; CHECK-NEXT: 00000000 "foo.dwo"<br>
>>>>  ; CHECK-NEXT: [[X3]] "X3"<br>
>>>>  ; CHECK-NEXT: [[X2]] "X2"<br>
>>>>  ; CHECK-NEXT: [[X1]] "X1"<br>
>>>> +; CHECK-NEXT: "foo.dwo"<br>
>>>>  ; CHECK-EMPTY:<br>
>>>><br>
>>>><br>
>>>><br>
>>>> Modified: llvm/trunk/test/DebugInfo/X86/string-offsets-table.ll<br>
>>>> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/string-offsets-table.ll?rev=349207&r1=349206&r2=349207&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/string-offsets-table.ll?rev=349207&r1=349206&r2=349207&view=diff</a><br>
>>>> ==============================================================================<br>
>>>> --- llvm/trunk/test/DebugInfo/X86/string-offsets-table.ll (original)<br>
>>>> +++ llvm/trunk/test/DebugInfo/X86/string-offsets-table.ll Fri Dec 14 14:44:46 2018<br>
>>>> @@ -59,8 +59,8 @@<br>
>>>>  ; SPLIT:      DW_TAG_compile_unit<br>
>>>>  ; SPLIT-NOT:  {{DW_TAG|contents:}}<br>
>>>>  ; SPLIT:      DW_AT_str_offsets_base [DW_FORM_sec_offset] (0x00000008)<br>
>>>> -; SPLIT:      DW_AT_GNU_dwo_name [DW_FORM_strx1] ( indexed (00000000) string = "foo.dwo")<br>
>>>> -; SPLIT:      DW_AT_comp_dir [DW_FORM_strx1] ( indexed (00000001) string = "/home/test")<br>
>>>> +; SPLIT:      DW_AT_comp_dir [DW_FORM_strx1] ( indexed (00000000) string = "/home/test")<br>
>>>> +; SPLIT:      DW_AT_GNU_dwo_name [DW_FORM_strx1] ( indexed (00000001) string = "foo.dwo")<br>
>>>><br>
>>>>  ; Check for the split CU in .debug_info.dwo.<br>
>>>>  ; SPLIT:      .debug_info.dwo contents:<br>
>>>> @@ -73,18 +73,18 @@<br>
>>>>  ; SPLIT-NOT:  contents:<br>
>>>>  ; SPLIT:      DW_TAG_enumerator<br>
>>>>  ; SPLIT-NOT:  {{DW_TAG|NULL}}<br>
>>>> -; SPLIT:      DW_AT_name [DW_FORM_strx1]    ( indexed (00000004) string = "a")<br>
>>>> +; SPLIT:      DW_AT_name [DW_FORM_strx1]    ( indexed (00000001) string = "a")<br>
>>>>  ; SPLIT-NOT:  contents:<br>
>>>>  ; SPLIT:      DW_TAG_enumerator<br>
>>>>  ; SPLIT-NOT:  {{DW_TAG|NULL}}<br>
>>>> -; SPLIT:      DW_AT_name [DW_FORM_strx1]    ( indexed (00000005) string = "b")<br>
>>>> +; SPLIT:      DW_AT_name [DW_FORM_strx1]    ( indexed (00000002) string = "b")<br>
>>>>  ;<br>
>>>>  ; Extract the string offsets referenced in the main file by the skeleton unit.<br>
>>>>  ; SPLIT:      .debug_str contents:<br>
>>>> -; SPLIT-NEXT: 0x00000000: "foo.dwo"<br>
>>>> -; SPLIT-NEXT: 0x[[STRING2SPLIT:[0-9a-f]*]]: "/home/test"<br>
>>>> -; SPLIT-NEXT: 0x[[STRING3SPLIT:[0-9a-f]*]]: "E"<br>
>>>> -; SPLIT-NEXT: 0x[[STRING4SPLIT:[0-9a-f]*]]: "glob"<br>
>>>> +; SPLIT-NEXT: 0x[[STRHOMETESTSPLIT:[0-9a-f]*]]: "/home/test"<br>
>>>> +; SPLIT-NEXT: 0x[[STRESPLIT:[0-9a-f]*]]: "E"<br>
>>>> +; SPLIT-NEXT: 0x[[STRGLOBSPLIT:[0-9a-f]*]]: "glob"<br>
>>>> +; SPLIT-NEXT: 0x[[STRFOODWOSPLIT:[0-9a-f]*]]: "foo.dwo"<br>
>>>>  ;<br>
>>>>  ; Extract the string offsets referenced in the .dwo file by the split unit.<br>
>>>>  ; SPLIT:      .debug_str.dwo contents:<br>
>>>> @@ -98,8 +98,8 @@<br>
>>>>  ; referenced by the debug info.<br>
>>>>  ; SPLIT:      .debug_str_offsets contents:<br>
>>>>  ; SPLIT-NEXT: 0x00000000: Contribution size = 12, Format = DWARF32, Version = 5<br>
>>>> -; SPLIT-NEXT: 0x00000008: 00000000 "foo.dwo"<br>
>>>> -; SPLIT-NEXT: 0x0000000c: [[STRING2SPLIT]] "/home/test"<br>
>>>> +; SPLIT-NEXT: 0x00000008: [[STRHOMETESTSPLIT]] "/home/test"<br>
>>>> +; SPLIT-NEXT: 0x0000000c: [[STRFOODWOSPLIT]] "foo.dwo"<br>
>>>>  ; SPLIT-EMPTY:<br>
>>>><br>
>>>>  ; SPLIT:      .debug_str_offsets.dwo contents:<br>
>>>><br>
>>>><br>
>>>> _______________________________________________<br>
>>>> llvm-commits mailing list<br>
>>>> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
>>>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>