Skip to content

Commit

Permalink
[DebugInfo][NFC] Do not call 'isRootFile' for DWARF Version < 5
Browse files Browse the repository at this point in the history
A quicker comparison should be done first.

Differential Revision: https://reviews.llvm.org/D117786
  • Loading branch information
igorkudrin committed Jan 21, 2022
1 parent 75184f1 commit 86b08ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/MC/MCDwarf.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 86b08ed

Please sign in to comment.