Skip to content

Commit 86b08ed

Browse files
committed
[DebugInfo][NFC] Do not call 'isRootFile' for DWARF Version < 5
A quicker comparison should be done first. Differential Revision: https://reviews.llvm.org/D117786
1 parent 75184f1 commit 86b08ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/MC/MCDwarf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ MCDwarfLineTableHeader::tryGetFile(StringRef &Directory,
586586
trackMD5Usage(Checksum.hasValue());
587587
HasSource = (Source != None);
588588
}
589-
if (isRootFile(RootFile, Directory, FileName, Checksum) && DwarfVersion >= 5)
589+
if (DwarfVersion >= 5 && isRootFile(RootFile, Directory, FileName, Checksum))
590590
return 0;
591591
if (FileNumber == 0) {
592592
// File numbers start with 1 and/or after any file numbers

0 commit comments

Comments
 (0)