Index: llvm/lib/MC/MCDwarf.cpp =================================================================== --- llvm/lib/MC/MCDwarf.cpp +++ llvm/lib/MC/MCDwarf.cpp @@ -586,7 +586,7 @@ 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