diff options
author | Ali Tamur <tamur@google.com> | 2019-03-26 20:05:27 +0000 |
---|---|---|
committer | Ali Tamur <tamur@google.com> | 2019-03-26 20:05:27 +0000 |
commit | 02e96648d75bcd04ad8b4a9e976c8ff8d1a9419e (patch) | |
tree | e353f6e7d239fcf8401a7ea35bf4415cc68f7c60 /llvm/lib/MC/MCDwarf.cpp | |
parent | cea954802817b60e16f89044a9f3ba29cea3a443 (diff) | |
download | llvm-02e96648d75bcd04ad8b4a9e976c8ff8d1a9419e.zip llvm-02e96648d75bcd04ad8b4a9e976c8ff8d1a9419e.tar.gz llvm-02e96648d75bcd04ad8b4a9e976c8ff8d1a9419e.tar.bz2 |
Revert "[llvm] Reapply "Prevent duplicate files in debug line header in dwarf 5.""
This reverts commit rL357020.
The commit broke the test llvm/test/tools/llvm-objdump/embedded-source.test
on some builds including clang-ppc64be-linux-multistage,
clang-s390x-linux, clang-with-lto-ubuntu, clang-x64-windows-msvc,
llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast (and others).
llvm-svn: 357026
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r-- | llvm/lib/MC/MCDwarf.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp index 73b4d4b..83b6b4f 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -542,15 +542,6 @@ Expected<unsigned> MCDwarfLineTable::tryGetFile(StringRef &Directory, return Header.tryGetFile(Directory, FileName, Checksum, Source, FileNumber); } -bool isRootFile(const MCDwarfFile &RootFile, StringRef &Directory, - StringRef &FileName, MD5::MD5Result *Checksum) { - if (RootFile.Name.empty() || RootFile.Name != FileName.data()) - return false; - if (!RootFile.Checksum) - return !Checksum; - return *RootFile.Checksum == *Checksum; -} - Expected<unsigned> MCDwarfLineTableHeader::tryGetFile(StringRef &Directory, StringRef &FileName, @@ -570,8 +561,6 @@ MCDwarfLineTableHeader::tryGetFile(StringRef &Directory, trackMD5Usage(Checksum); HasSource = (Source != None); } - if (isRootFile(RootFile, Directory, FileName, Checksum) && DwarfVersion >= 5) - return 0; if (FileNumber == 0) { // File numbers start with 1 and/or after any file numbers // allocated by inline-assembler .file directives. |