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)
commit9acebfdd94408d5477eb673b8a82887de5e5f1f0
tree38c5c67639b6501c282564e94d971a41a30ba9b1
parent7741101dce76de2a0d335beee596890ed0a6b507
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.

llvm-svn: 201429
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/lib/MC/MCObjectStreamer.cpp
llvm/test/DebugInfo/X86/generate-odr-hash.ll
llvm/test/DebugInfo/empty.ll [new file with mode: 0644]