[lld] r281795 - Partially fill Info stream with proper values.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 16 15:51:17 PDT 2016
Author: ruiu
Date: Fri Sep 16 17:51:17 2016
New Revision: 281795
URL: http://llvm.org/viewvc/llvm-project?rev=281795&view=rev
Log:
Partially fill Info stream with proper values.
Modified:
lld/trunk/COFF/PDB.cpp
lld/trunk/test/COFF/pdb.test
Modified: lld/trunk/COFF/PDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/PDB.cpp?rev=281795&r1=281794&r2=281795&view=diff
==============================================================================
--- lld/trunk/COFF/PDB.cpp (original)
+++ lld/trunk/COFF/PDB.cpp Fri Sep 16 17:51:17 2016
@@ -60,8 +60,17 @@ void coff::createPDB(StringRef Path) {
ExitOnErr(Builder.getMsfBuilder().addStream(1, {5}));
ExitOnErr(Builder.getMsfBuilder().addStream(1, {6}));
- // Add an empty IPI stream.
- Builder.getInfoBuilder();
+ // Add an Info stream.
+ auto &InfoBuilder = Builder.getInfoBuilder();
+ InfoBuilder.setAge(1);
+
+ // Should be a random number, 0 for now.
+ InfoBuilder.setGuid({});
+
+ // Should be the current time, but set 0 for reproducibilty.
+ InfoBuilder.setSignature(0);
+
+ InfoBuilder.setVersion(pdb::PdbRaw_ImplVer::PdbImplVC70);
// Add an empty TPI stream.
auto &TpiBuilder = Builder.getTpiBuilder();
Modified: lld/trunk/test/COFF/pdb.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/pdb.test?rev=281795&r1=281794&r2=281795&view=diff
==============================================================================
--- lld/trunk/test/COFF/pdb.test (original)
+++ lld/trunk/test/COFF/pdb.test Fri Sep 16 17:51:17 2016
@@ -1,6 +1,7 @@
# RUN: yaml2obj %s > %t.obj
# RUN: lld-link /debug /pdb:%t.pdb /dll /out:%t.dll /entry:DllMain %t.obj
-# RUN: llvm-pdbdump pdb2yaml -stream-metadata -stream-directory %t.pdb | FileCheck %s
+# RUN: llvm-pdbdump pdb2yaml -stream-metadata -stream-directory -pdb-stream \
+# RUN: %t.pdb | FileCheck %s
# CHECK: MSF:
# CHECK-NEXT: SuperBlock:
@@ -19,6 +20,12 @@
# CHECK-NEXT: - Stream: [ 4 ]
# CHECK-NEXT: - Stream: [ 5 ]
# CHECK-NEXT: - Stream: [ 6 ]
+# CHECK-NEXT: PdbStream:
+# CHECK-NEXT: Age: 1
+# CHECK-NEXT: Guid: '{00000000-0000-0000-0000-000000000000}'
+# CHECK-NEXT: Signature: 0
+# CHECK-NEXT: Version: VC70
+# CHECK-NEXT: NamedStreams:
--- !COFF
header:
More information about the llvm-commits
mailing list