[DebugInfo][NFC] Do not call 'isRootFile' for DWARF Version < 5

A quicker comparison should be done first.

Differential Revision: https://reviews.llvm.org/D117786
This commit is contained in:
Igor Kudrin 2022-01-21 13:04:44 +07:00
parent 75184f14ae
commit 86b08ed6bb
1 changed files with 1 additions and 1 deletions

View File

@ -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