diff options
author | Igor Kudrin <ikudrin@accesssoftek.com> | 2022-01-21 13:04:44 +0700 |
---|---|---|
committer | Igor Kudrin <ikudrin@accesssoftek.com> | 2022-01-21 13:52:10 +0700 |
commit | 86b08ed6bb16a96e921445299858f3cabd6f9e45 (patch) | |
tree | 407ca90adb4951f92477345b67a5a1a6c598d64d /llvm/lib/MC/MCDwarf.cpp | |
parent | 75184f14aecd8147a02189a843789a4eb5e5b571 (diff) | |
download | llvm-86b08ed6bb16a96e921445299858f3cabd6f9e45.zip llvm-86b08ed6bb16a96e921445299858f3cabd6f9e45.tar.gz llvm-86b08ed6bb16a96e921445299858f3cabd6f9e45.tar.bz2 |
[DebugInfo][NFC] Do not call 'isRootFile' for DWARF Version < 5
A quicker comparison should be done first.
Differential Revision: https://reviews.llvm.org/D117786
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r-- | llvm/lib/MC/MCDwarf.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp index 15cfdba..2cb5a00 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -586,7 +586,7 @@ MCDwarfLineTableHeader::tryGetFile(StringRef &Directory, trackMD5Usage(Checksum.hasValue()); HasSource = (Source != None); } - if (isRootFile(RootFile, Directory, FileName, Checksum) && DwarfVersion >= 5) + if (DwarfVersion >= 5 && isRootFile(RootFile, Directory, FileName, Checksum)) return 0; if (FileNumber == 0) { // File numbers start with 1 and/or after any file numbers |