diff options
| author | Rui Ueyama <ruiu@google.com> | 2016-09-16 22:51:17 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2016-09-16 22:51:17 +0000 |
| commit | bb542b3f0c37a9d9d6719be7778e1f8600c0e2b7 (patch) | |
| tree | 58cb5cdb6eae0542875294ea2f9eebf2be032f0d | |
| parent | 373343bd5b92b48896af772085e482f629855a2e (diff) | |
| download | bcm5719-llvm-bb542b3f0c37a9d9d6719be7778e1f8600c0e2b7.tar.gz bcm5719-llvm-bb542b3f0c37a9d9d6719be7778e1f8600c0e2b7.zip | |
Partially fill Info stream with proper values.
llvm-svn: 281795
| -rw-r--r-- | lld/COFF/PDB.cpp | 13 | ||||
| -rw-r--r-- | lld/test/COFF/pdb.test | 9 |
2 files changed, 19 insertions, 3 deletions
diff --git a/lld/COFF/PDB.cpp b/lld/COFF/PDB.cpp index 0c38e26a70d..2859c27effb 100644 --- a/lld/COFF/PDB.cpp +++ b/lld/COFF/PDB.cpp @@ -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(); diff --git a/lld/test/COFF/pdb.test b/lld/test/COFF/pdb.test index ade135af7b9..1747e71f8c9 100644 --- a/lld/test/COFF/pdb.test +++ b/lld/test/COFF/pdb.test @@ -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: |

