Skip to content

Commit 9084934

Browse files
authored
[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.
1 parent 1f01269 commit 9084934

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/LTO/ThinLTOCodeGenerator.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ static StringMap<lto::InputFile *>
151151
generateModuleMap(std::vector<std::unique_ptr<lto::InputFile>> &Modules) {
152152
StringMap<lto::InputFile *> ModuleMap;
153153
for (auto &M : Modules) {
154+
LLVM_DEBUG(dbgs() << "Adding module " << M->getName() << " to ModuleMap\n");
154155
assert(!ModuleMap.contains(M->getName()) &&
155156
"Expect unique Buffer Identifier");
156157
ModuleMap[M->getName()] = M.get();

0 commit comments

Comments
 (0)