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

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 20 07:17:37 PST 2022


ikudrin created this revision.
ikudrin added reviewers: probinson, dblaikie, tamur.
ikudrin added projects: LLVM, debug-info.
Herald added a subscriber: hiraditya.
ikudrin requested review of this revision.

A quicker comparison should be done first.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117786

Files:
  llvm/lib/MC/MCDwarf.cpp


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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117786.401637.patch
Type: text/x-patch
Size: 523 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220120/b1555b00/attachment.bin>


More information about the llvm-commits mailing list