COFF: PDB: Allow multiple modules with the same name.
It is possible for two modules to have the same name if they are
archive members with the same name, or if we are doing LTO (in which
case all modules will have the name "lto.tmp").
Differential Revision: https://reviews.llvm.org/D37589
llvm-svn: 312744
diff --git a/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp b/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp
index 1883450..8b2d5ce 100644
--- a/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp
+++ b/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp
@@ -704,7 +704,7 @@
ModiBuilder.setObjFileName(MI.Obj);
for (auto S : MI.SourceFiles)
- ExitOnErr(DbiBuilder.addModuleSourceFile(MI.Mod, S));
+ ExitOnErr(DbiBuilder.addModuleSourceFile(ModiBuilder, S));
if (MI.Modi.hasValue()) {
const auto &ModiStream = *MI.Modi;
for (auto Symbol : ModiStream.Symbols) {