aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/LTO/LTO.cpp
diff options
context:
space:
mode:
authorJez Ng <jezng@fb.com>2023-03-07 20:48:25 -0800
committerJez Ng <jezng@fb.com>2023-03-09 13:25:48 -0800
commit8be84e1e31126a60b585a53a2943d0a6eafe4be2 (patch)
tree5631a26801d525fcc06beaee78dc379bc26a5dc7 /llvm/lib/LTO/LTO.cpp
parent6df483c9a03b40a3e29bff7f3b0c0859c45ae882 (diff)
downloadllvm-8be84e1e31126a60b585a53a2943d0a6eafe4be2.zip
llvm-8be84e1e31126a60b585a53a2943d0a6eafe4be2.tar.gz
llvm-8be84e1e31126a60b585a53a2943d0a6eafe4be2.tar.bz2
[LTO] Add debug logging for module ID <-> path mapping
It's helpful Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D145541
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
-rw-r--r--llvm/lib/LTO/LTO.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index 1b1cbe4..1f273a8 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -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);