<div dir="ltr">Yep, sorry about that - I should've followed up here when it was identified/fixed for the record.</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 21, 2018 at 4:58 AM Pavel Labath <<a href="mailto:labath@google.com">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">Oh, it looks like you already fixed this in r349819. I guess it was my<br>
turn now not to update my checkout. Sorry for the noise and happy<br>
holidays.<br>
<br>
On Fri, 21 Dec 2018 at 13:40, Pavel Labath <<a href="mailto:labath@google.com" target="_blank">labath@google.com</a>> wrote:<br>
><br>
> Hello David,<br>
><br>
> I hate to bring this up again, but I've found another (probably<br>
> unintended) side-effect of this change. After this patch, clang starts<br>
> duplicating the compilation directory in the list of<br>
> include_directories in the .debug_line table. See the following<br>
> example:<br>
><br>
> /tmp $ cat a.c<br>
> int main() { return 47; }<br>
> /tmp $ ~/ll/build/opt/bin/clang -gsplit-dwarf a.c -c<br>
> pavelo@unimatrix0 /tmp $ llvm-dwarfdump a.o -debug-line<br>
> a.o: file format ELF64-x86-64<br>
><br>
> .debug_line contents:<br>
> debug_line[0x00000000]<br>
> Line table prologue:<br>
> total_length: 0x0000003b<br>
> version: 4<br>
> prologue_length: 0x00000020<br>
> min_inst_length: 1<br>
> max_ops_per_inst: 1<br>
> default_is_stmt: 1<br>
> line_base: -5<br>
> line_range: 14<br>
> opcode_base: 13<br>
> standard_opcode_lengths[DW_LNS_copy] = 0<br>
> standard_opcode_lengths[DW_LNS_advance_pc] = 1<br>
> standard_opcode_lengths[DW_LNS_advance_line] = 1<br>
> standard_opcode_lengths[DW_LNS_set_file] = 1<br>
> standard_opcode_lengths[DW_LNS_set_column] = 1<br>
> standard_opcode_lengths[DW_LNS_negate_stmt] = 0<br>
> standard_opcode_lengths[DW_LNS_set_basic_block] = 0<br>
> standard_opcode_lengths[DW_LNS_const_add_pc] = 0<br>
> standard_opcode_lengths[DW_LNS_fixed_advance_pc] = 1<br>
> standard_opcode_lengths[DW_LNS_set_prologue_end] = 0<br>
> standard_opcode_lengths[DW_LNS_set_epilogue_begin] = 0<br>
> standard_opcode_lengths[DW_LNS_set_isa] = 1<br>
> include_directories[ 1] = '/tmp' # <===== DUPLICATION HERE<br>
> Dir Mod Time File Len File Name<br>
> ---- ---------- ---------- ---------------------------<br>
> file_names[ 1] 1 0x00000000 0x00000000 a.c # <===== REFERENCES<br>
> DIR 1 INSTEAD OF 0<br>
><br>
> Address Line Column File ISA Discriminator Flags<br>
> ------------------ ------ ------ ------ --- ------------- -------------<br>
> 0x0000000000000000 1 0 1 0 0 is_stmt<br>
> 0x000000000000000b 1 14 1 0 0 is_stmt<br>
> prologue_end<br>
> 0x0000000000000012 1 14 1 0 0 is_stmt<br>
> end_sequence<br>
><br>
> So, basically the compilation dir is present in the line table twice,<br>
> once as the first explicit entry, and once as the implicit [0] entry.<br>
> (I've checked that .debug_info contains the correct DW_AT_comp_dir<br>
> attribute).<br>
> Reverting this patch (and those that depend on it) brings back the<br>
> original behavior -- no additional include_directories, and the<br>
> file_names array references the implicit [0] entry.<br>
><br>
> Now this doesn't make the line table invalid, and the only reason I've<br>
> found this is because of some questionable logic in lldb, which<br>
> attempts to support the PWD=/proc/self/cwd workflow by resolving the<br>
> symlinks in the compilation directory (and _only_ the compilation<br>
> directory). This now fails because none of the line entries actually<br>
> use the compilation directory. It is certainly possible to work around<br>
> this from the lldb side, but since this means (at the very least) that<br>
> llvm is producing sub-optimal line tables, I though it would be good<br>
> to bring this to your attention.<br>
><br>
> thanks,<br>
> pavel<br>
><br>
><br>
> On Wed, 19 Dec 2018 at 10:36, Pavel Labath <<a href="mailto:labath@google.com" target="_blank">labath@google.com</a>> wrote:<br>
> ><br>
> > Thanks for the quick fix.<br>
> ><br>
> > pl<br>
> ><br>
> > On Tue, 18 Dec 2018 at 20:44, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
> > ><br>
> > > Should be fixed in r349528 - thanks for identifying this!<br>
> > ><br>
> > > On Tue, Dec 18, 2018 at 10:54 AM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
> > >><br>
> > >> 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<br>
> > >><br>
> > >> 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>
> > >>><br>
> > >>> 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>
> > >>> $ 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>
> > >>> test.dwo: file format ELF64-x86-64<br>
> > >>><br>
> > >>> .debug_info.dwo contents:<br>
> > >>> 0x00000000: Compile Unit: length = 0x00000044 version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000048)<br>
> > >>><br>
> > >>> 0x0000000b: DW_TAG_compile_unit<br>
> > >>> DW_AT_GNU_dwo_name ("test.dwo")<br>
> > >>> DW_AT_producer ("clang version 8.0.0 (trunk 349415) (llvm/trunk 349196)")<br>
> > >>> DW_AT_language (DW_LANG_C_plus_plus)<br>
> > >>> DW_AT_name ("test.cpp")<br>
> > >>> DW_AT_GNU_dwo_id (0xe9ee94e9755dc4ee)<br>
> > >>> 0x00000019: DW_TAG_namespace<br>
> > >>> DW_AT_name ("ns1")<br>
> > >>> 0x0000001b: DW_TAG_variable<br>
> > >>> DW_AT_name ("value")<br>
> > >>> DW_AT_type (0x00000028 "int")<br>
> > >>> DW_AT_external (true)<br>
> > >>> DW_AT_decl_file (0x01)<br>
> > >>> DW_AT_decl_line (4)<br>
> > >>> DW_AT_location (DW_OP_GNU_addr_index 0x0)<br>
> > >>> DW_AT_linkage_name ("_ZN3ns15valueE")<br>
> > >>> 0x00000027: NULL<br>
> > >>> 0x00000028: DW_TAG_base_type<br>
> > >>> DW_AT_name ("int")<br>
> > >>> DW_AT_encoding (DW_ATE_signed)<br>
> > >>> DW_AT_byte_size (0x04)<br>
> > >>> 0x0000002c: DW_TAG_subprogram<br>
> > >>> DW_AT_low_pc ( indexed (00000001) address = <no .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>
> > >>> 0x00000038: DW_TAG_lexical_block<br>
> > >>> DW_AT_low_pc ( indexed (00000002) address = <no .debug_addr section>)<br>
> > >>> DW_AT_high_pc (0x0000000c)<br>
> > >>> 0x0000003e: DW_TAG_imported_module<br>
> > >>> DW_AT_decl_file (0x01)<br>
> > >>> DW_AT_decl_line (9)<br>
> > >>> DW_AT_import (0x00000019)<br>
> > >>> 0x00000045: NULL<br>
> > >>> 0x00000046: NULL<br>
> > >>> 0x00000047: NULL<br>
> > >>><br>
> > >>><br>
> > >>> 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>
> > >>>><br>
> > >>>> 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>