aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCStreamer.cpp
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2018-03-06 01:59:56 +0000
committerPaul Robinson <paul.robinson@sony.com>2018-03-06 01:59:56 +0000
commitd5069ba3da031774ad6b751f0f72c65e7dda9b04 (patch)
treeefa6dae9e93355da9e17edf2ba279c6ae71bdbf9 /llvm/lib/MC/MCStreamer.cpp
parentb8b9af2ad46ff1ed901956c155c48c15cb585fa9 (diff)
downloadllvm-d5069ba3da031774ad6b751f0f72c65e7dda9b04.zip
llvm-d5069ba3da031774ad6b751f0f72c65e7dda9b04.tar.gz
llvm-d5069ba3da031774ad6b751f0f72c65e7dda9b04.tar.bz2
[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. Differential Revision: https://reviews.llvm.org/D44054 llvm-svn: 326758
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCStreamer.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index bf27a0a..eed061d 100644
--- a/llvm/lib/MC/MCStreamer.cpp
+++ b/llvm/lib/MC/MCStreamer.cpp
@@ -199,6 +199,15 @@ MCStreamer::tryEmitDwarfFileDirective(unsigned FileNo, StringRef Directory,
Source, CUID);
}
+void MCStreamer::emitDwarfFile0Directive(StringRef Directory,
+ StringRef Filename,
+ MD5::MD5Result *Checksum,
+ Optional<StringRef> Source,
+ unsigned CUID) {
+ getContext().setMCLineTableRootFile(CUID, Directory, Filename, Checksum,
+ Source);
+}
+
void MCStreamer::EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
unsigned Column, unsigned Flags,
unsigned Isa,