[DWARFv5] Tolerate files not all having an MD5 checksum.
authorPaul Robinson <paul.robinson@sony.com>
Thu, 14 Jun 2018 13:38:20 +0000 (13:38 +0000)
committerPaul Robinson <paul.robinson@sony.com>
Thu, 14 Jun 2018 13:38:20 +0000 (13:38 +0000)
commitcc7344aae353493758a02a43d8c125ebfe500176
tree217d1c604bcecd92149ba7cd93faa8d2e847ad4b
parent767e1521656a834da28a723134dd5f344e9dbd70
[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
llvm/include/llvm/MC/MCContext.h
llvm/include/llvm/MC/MCDwarf.h
llvm/lib/MC/MCAsmStreamer.cpp
llvm/lib/MC/MCDwarf.cpp
llvm/lib/MC/MCParser/AsmParser.cpp
llvm/test/CodeGen/Generic/dwarf-md5.ll
llvm/test/CodeGen/Generic/dwarf-source.ll
llvm/test/MC/ELF/debug-md5-err.s
llvm/test/MC/ELF/debug-mixed-md5.ll [new file with mode: 0644]