[lld] r283504 - Add an empty DBI stream.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 6 15:52:01 PDT 2016
Author: ruiu
Date: Thu Oct 6 17:52:01 2016
New Revision: 283504
URL: http://llvm.org/viewvc/llvm-project?rev=283504&view=rev
Log:
Add an empty DBI stream.
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=283504&r1=283503&r2=283504&view=diff
==============================================================================
--- lld/trunk/COFF/PDB.cpp (original)
+++ lld/trunk/COFF/PDB.cpp Thu Oct 6 17:52:01 2016
@@ -49,9 +49,12 @@ void coff::createPDB(StringRef Path) {
// Should be the current time, but set 0 for reproducibilty.
InfoBuilder.setSignature(0);
-
InfoBuilder.setVersion(pdb::PdbRaw_ImplVer::PdbImplVC70);
+ // Add an empty DPI stream.
+ auto &DbiBuilder = Builder.getDbiBuilder();
+ DbiBuilder.setVersionHeader(pdb::PdbDbiV110);
+
// Add an empty TPI stream.
auto &TpiBuilder = Builder.getTpiBuilder();
TpiBuilder.setVersionHeader(pdb::PdbTpiV80);
Modified: lld/trunk/test/COFF/pdb.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/pdb.test?rev=283504&r1=283503&r2=283504&view=diff
==============================================================================
--- lld/trunk/test/COFF/pdb.test (original)
+++ lld/trunk/test/COFF/pdb.test Thu Oct 6 17:52:01 2016
@@ -1,33 +1,41 @@
# 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 -pdb-stream \
-# RUN: -ipi-stream %t.pdb | FileCheck %s
+# RUN: -dbi-stream -ipi-stream %t.pdb | FileCheck %s
# CHECK: MSF:
# CHECK-NEXT: SuperBlock:
# CHECK-NEXT: BlockSize: 4096
# CHECK-NEXT: FreeBlockMap:
-# CHECK-NEXT: NumBlocks: 8
-# CHECK-NEXT: NumDirectoryBytes: 36
+# CHECK-NEXT: NumBlocks: 9
+# CHECK-NEXT: NumDirectoryBytes: 40
# CHECK-NEXT: Unknown1: 0
# CHECK-NEXT: BlockMapAddr: 3
# CHECK-NEXT: NumDirectoryBlocks: 1
-# CHECK-NEXT: DirectoryBlocks: [ 7 ]
+# CHECK-NEXT: DirectoryBlocks: [ 8 ]
# CHECK-NEXT: NumStreams: 5
-# CHECK-NEXT: FileSize: 32768
-# CHECK-NEXT: StreamSizes: [ 0, 48, 56, 0, 56 ]
+# CHECK-NEXT: FileSize: 36864
+# CHECK-NEXT: StreamSizes: [ 0, 48, 56, 68, 56 ]
# CHECK-NEXT: StreamMap:
# CHECK-NEXT: - Stream: [ ]
# CHECK-NEXT: - Stream: [ 4 ]
-# CHECK-NEXT: - Stream: [ 5 ]
-# CHECK-NEXT: - Stream: [ ]
# CHECK-NEXT: - Stream: [ 6 ]
+# CHECK-NEXT: - Stream: [ 5 ]
+# CHECK-NEXT: - Stream: [ 7 ]
# 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:
+# CHECK-NEXT: DbiStream:
+# CHECK-NEXT: VerHeader: V110
+# CHECK-NEXT: Age: 1
+# CHECK-NEXT: BuildNumber: 0
+# CHECK-NEXT: PdbDllVersion: 0
+# CHECK-NEXT: PdbDllRbld: 0
+# CHECK-NEXT: Flags: 0
+# CHECK-NEXT: MachineType: x86
# CHECK-NEXT: IpiStream:
# CHECK-NEXT: Version: VC80
# CHECK-NEXT: Records:
More information about the llvm-commits
mailing list