Skip to content

Commit

Permalink
[LTO] Add debug logging for module ID <-> path mapping
Browse files Browse the repository at this point in the history
It's helpful

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D145541
  • Loading branch information
int3 committed Mar 9, 2023
1 parent 6df483c commit 8be84e1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion llvm/lib/LTO/LTO.cpp
Expand Up @@ -925,13 +925,16 @@ Error LTO::addThinLTO(BitcodeModule BM, ArrayRef<InputFile::Symbol> Syms,
}
}

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);
Expand Down

0 comments on commit 8be84e1

Please sign in to comment.