[PATCH] D33463: [llvm-pdbdump] [yaml2pdb] always include object file name in module info

Bob Haarman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 11:04:34 PDT 2017


This revision was automatically updated to reflect the committed changes.
inglorion marked an inline comment as done.
Closed by commit rL303891: [llvm-pdbdump] [yaml2pdb] always include object file name in module info (authored by inglorion).

Changed prior to commit:
  https://reviews.llvm.org/D33463?vs=100184&id=100271#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D33463

Files:
  llvm/trunk/test/DebugInfo/PDB/pdbdump-objfilename.yaml
  llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp


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);
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33463.100271.patch
Type: text/x-patch
Size: 1432 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170525/67bd6783/attachment.bin>


More information about the llvm-commits mailing list