[llvm] 9084934 - [ThinLTO][NFC] Add Module Name Debug Print when Generating Module Maps (#67820)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 3 06:50:12 PDT 2023
Author: Qiongsi Wu
Date: 2023-10-03T09:50:08-04:00
New Revision: 9084934aa95ce01dd2ab18f5b6eedbdf4fdddeae
URL: https://github.com/llvm/llvm-project/commit/9084934aa95ce01dd2ab18f5b6eedbdf4fdddeae
DIFF: https://github.com/llvm/llvm-project/commit/9084934aa95ce01dd2ab18f5b6eedbdf4fdddeae.diff
LOG: [ThinLTO][NFC] Add Module Name Debug Print when Generating Module Maps (#67820)
When computing the module maps, `ThinLTOCodeGenerator` asserts if it
sees duplicating module names. This PR adds a debug print, so that the
list of modules already added can be printed. With this information, one
can identify which modules are causing the duplication.
Added:
Modified:
llvm/lib/LTO/ThinLTOCodeGenerator.cpp
Removed:
################################################################################
diff --git a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
index acff1e2cf3b33b0..443439b71e7566c 100644
--- a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
@@ -151,6 +151,7 @@ static StringMap<lto::InputFile *>
generateModuleMap(std::vector<std::unique_ptr<lto::InputFile>> &Modules) {
StringMap<lto::InputFile *> ModuleMap;
for (auto &M : Modules) {
+ LLVM_DEBUG(dbgs() << "Adding module " << M->getName() << " to ModuleMap\n");
assert(!ModuleMap.contains(M->getName()) &&
"Expect unique Buffer Identifier");
ModuleMap[M->getName()] = M.get();
More information about the llvm-commits
mailing list