[PATCH] D145541: [LTO] Add debug logging for module ID <-> path mapping

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 9 13:13:59 PST 2023


int3 updated this revision to Diff 503910.
int3 added a comment.

address comment


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145541/new/

https://reviews.llvm.org/D145541

Files:
  llvm/lib/LTO/LTO.cpp


Index: llvm/lib/LTO/LTO.cpp
===================================================================
--- llvm/lib/LTO/LTO.cpp
+++ llvm/lib/LTO/LTO.cpp
@@ -925,13 +925,16 @@
     }
   }
 
+  uint64_t ModuleId = ThinLTO.ModuleMap.size();
   if (Error Err =
           BM.readSummary(ThinLTO.CombinedIndex, BM.getModuleIdentifier(),
-                         ThinLTO.ModuleMap.size(), [&](GlobalValue::GUID GUID) {
+                         ModuleID, [&](GlobalValue::GUID GUID) {
                            return ThinLTO.PrevailingModuleForGUID[GUID] ==
                                   BM.getModuleIdentifier();
                          }))
     return Err;
+  LLVM_DEBUG(dbgs() << "Module " << ModuleId << ": " << BM.getModuleIdentifier()
+                    << "\n");
 
   for (const InputFile::Symbol &Sym : Syms) {
     assert(ResI != ResE);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145541.503910.patch
Type: text/x-patch
Size: 846 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230309/88c19422/attachment.bin>


More information about the llvm-commits mailing list