Index: llvm/trunk/test/DebugInfo/PDB/pdbdump-objfilename.yaml =================================================================== --- llvm/trunk/test/DebugInfo/PDB/pdbdump-objfilename.yaml +++ llvm/trunk/test/DebugInfo/PDB/pdbdump-objfilename.yaml @@ -0,0 +1,14 @@ +# RUN: llvm-pdbdump yaml2pdb -pdb=%T/objfilename.pdb %s +# RUN: llvm-pdbdump pdb2yaml -dbi-module-info %T/objfilename.pdb \ +# RUN: | FileCheck %s +# +# CHECK: DbiStream: +# CHECK: Modules: +# CHECK-NEXT: - Module:{{ *}}'C:\src\test.obj' +# CHECK-NEXT: ObjFile:{{ *}}'C:\src\test.obj' +--- +DbiStream: + Modules: + - Module: 'C:\src\test.obj' + ObjFile: 'C:\src\test.obj' +... Index: llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp =================================================================== --- llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp +++ llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp @@ -525,12 +525,12 @@ DbiBuilder.setVersionHeader(Dbi.VerHeader); for (const auto &MI : Dbi.ModInfos) { auto &ModiBuilder = ExitOnErr(DbiBuilder.addModuleInfo(MI.Mod)); + ModiBuilder.setObjFileName(MI.Obj); for (auto S : MI.SourceFiles) ExitOnErr(DbiBuilder.addModuleSourceFile(MI.Mod, S)); if (MI.Modi.hasValue()) { const auto &ModiStream = *MI.Modi; - ModiBuilder.setObjFileName(MI.Obj); for (auto Symbol : ModiStream.Symbols) ModiBuilder.addSymbol(Symbol.Record); }