OSDN Git Service

Reapply "[DWARFv5] Emit file 0 to the line table."
authorPaul Robinson <paul.robinson@sony.com>
Thu, 29 Mar 2018 17:16:41 +0000 (17:16 +0000)
committerPaul Robinson <paul.robinson@sony.com>
Thu, 29 Mar 2018 17:16:41 +0000 (17:16 +0000)
commit274009662fbefcb213dc29e6e278bb974164e3e5
tree0524b3c780b17da2d19427ad25cc25c8386139aa
parent5551cf2225c06aad15705dcd4620612c8bc04f07
Reapply "[DWARFv5] Emit file 0 to the line table."

DWARF v5 specifies that the root file (also given in the DW_AT_name
attribute of the compilation unit DIE) should be emitted explicitly to
the line table's list of files.  This makes the line table more
independent of the .debug_info section.
We emit the new syntax only for DWARF v5 and later.

Fixes the bug found by asan. Also XFAIL the new test for Darwin, which
is stuck on DWARF v2, and fix up other tests so they stop failing on
Windows.  Last but not least, don't break "clang -g" of an assembler
file that has .file directives in it.

Differential Revision: https://reviews.llvm.org/D44054

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328805 91177308-0d34-0410-b5e6-96231b3b80d8
20 files changed:
include/llvm/MC/MCContext.h
include/llvm/MC/MCDwarf.h
include/llvm/MC/MCStreamer.h
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
lib/CodeGen/AsmPrinter/DwarfUnit.h
lib/MC/MCAsmStreamer.cpp
lib/MC/MCDwarf.cpp
lib/MC/MCParser/AsmParser.cpp
lib/MC/MCStreamer.cpp
test/CodeGen/Generic/dwarf-md5.ll
test/CodeGen/Generic/dwarf-source.ll
test/DebugInfo/X86/dbg-file-name.ll
test/DebugInfo/X86/inline-asm-locs.ll
test/MC/ARM/dwarf-asm-multiple-sections.s
test/MC/ELF/debug-file-options.s
test/MC/ELF/debug-md5.s
test/MC/ELF/debug-source.s
test/MC/ELF/dwarf-file0.s [new file with mode: 0644]
tools/llvm-mc/llvm-mc.cpp