diff options
author | Paul Robinson <paul.robinson@sony.com> | 2018-06-14 13:38:20 +0000 |
---|---|---|
committer | Paul Robinson <paul.robinson@sony.com> | 2018-06-14 13:38:20 +0000 |
commit | cc7344aae353493758a02a43d8c125ebfe500176 (patch) | |
tree | 217d1c604bcecd92149ba7cd93faa8d2e847ad4b /llvm/lib/MC/MCAsmStreamer.cpp | |
parent | 767e1521656a834da28a723134dd5f344e9dbd70 (diff) | |
download | bcm5719-llvm-cc7344aae353493758a02a43d8c125ebfe500176.tar.gz bcm5719-llvm-cc7344aae353493758a02a43d8c125ebfe500176.zip |
[DWARFv5] Tolerate files not all having an MD5 checksum.
In some cases, for example when compiling a preprocessed file, the
front-end is not able to provide an MD5 checksum for all files. When
that happens, omit the MD5 checksums from the final DWARF, because
DWARF doesn't have a way to indicate that some but not all files have
a checksum.
When assembling a .s file, and some but not all .file directives
provide an MD5 checksum, issue a warning and don't emit MD5 into the
DWARF.
Fixes PR37623.
Differential Revision: https://reviews.llvm.org/D48135
llvm-svn: 334710
Diffstat (limited to 'llvm/lib/MC/MCAsmStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCAsmStreamer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp index d07f3cac410..681e7e482e7 100644 --- a/llvm/lib/MC/MCAsmStreamer.cpp +++ b/llvm/lib/MC/MCAsmStreamer.cpp @@ -1171,6 +1171,9 @@ void MCAsmStreamer::emitDwarfFile0Directive(StringRef Directory, // .file 0 is new for DWARF v5. if (getContext().getDwarfVersion() < 5) return; + // Inform MCDwarf about the root file. + getContext().setMCLineTableRootFile(CUID, Directory, Filename, Checksum, + Source); SmallString<128> Str; raw_svector_ostream OS1(Str); |