DebugInfo: Don't include the name of the CU file in the line table file list when...
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 14 Feb 2014 19:51:35 +0000 (19:51 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 14 Feb 2014 19:51:35 +0000 (19:51 +0000)
commitc4e1b13b0837ae3aa2695bec6d0b646b0784edb2
tree87f7bb4b8a83cad0ee45499f5a99b2314dee6731
parent837c54fa7bc1873fc739cbc163b8b5f207bc996c
DebugInfo: Don't include the name of the CU file in the line table file list when it's unneeded

Recommitting r201380 (reverted in r201389)
Recommitting r201351 and r201355 (reverted in r201351 and r201355)

We weren't emitting the an empty (header only) line table when the line
table was empty - this made the DWARF invalid (the compile unit would
point to the zero-size debug_lines section where there should've been an
empty line table but there was nothing at all). Fix that, and as a
consequence this works around/addresses PR18809.

Also, we emit a non-empty line table to workaround a darwin linker bug,
so XFAILing on darwin too.

Also, mark the test as 'REQUIRES: object-emission' because it does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201429 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/MC/MCObjectStreamer.cpp
test/DebugInfo/X86/generate-odr-hash.ll
test/DebugInfo/empty.ll [new file with mode: 0644]