OSDN Git Service

Reapply "[DWARFv5] Emit file 0 to the line table."
authorPaul Robinson <paul.robinson@sony.com>
Tue, 27 Mar 2018 22:40:34 +0000 (22:40 +0000)
committerPaul Robinson <paul.robinson@sony.com>
Tue, 27 Mar 2018 22:40:34 +0000 (22:40 +0000)
commit973d7ed6e9cba299ca1dc1679a48a971d8d68f11
tree0bee64d4b8e3f1ba8f182fef093a8f8bc327d5be
parent49dbb6edd824838dae26ce69e6284c1b9df6ea42
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.

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@328676 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