[lld] r309608 - [lld/pdb] Add an empty globals stream.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 31 12:36:08 PDT 2017
Author: zturner
Date: Mon Jul 31 12:36:08 2017
New Revision: 309608
URL: http://llvm.org/viewvc/llvm-project?rev=309608&view=rev
Log:
[lld/pdb] Add an empty globals stream.
We don't write any actual symbols to this stream yet, but for
now we just create the stream and hook it up to the appropriate
places and give it a valid header.
Differential Revision: https://reviews.llvm.org/D35290
Modified:
lld/trunk/COFF/PDB.cpp
lld/trunk/test/COFF/pdb-diff.test
Modified: lld/trunk/COFF/PDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/PDB.cpp?rev=309608&r1=309607&r2=309608&view=diff
==============================================================================
--- lld/trunk/COFF/PDB.cpp (original)
+++ lld/trunk/COFF/PDB.cpp Mon Jul 31 12:36:08 2017
@@ -597,6 +597,10 @@ void PDBLinker::addObjectsToPDB() {
for (const PublicSym32 &Pub : Publics)
PublicsBuilder.addPublicSymbol(Pub);
}
+ // Add globals stream. For now we don't actually write any thing useful to
+ // the globals stream, but the act of "getting" it also creates it lazily so
+ // that we write an empty stream.
+ (void)Builder.getGlobalsBuilder();
}
static void addLinkerModuleSymbols(StringRef Path,
Modified: lld/trunk/test/COFF/pdb-diff.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/pdb-diff.test?rev=309608&r1=309607&r2=309608&view=diff
==============================================================================
--- lld/trunk/test/COFF/pdb-diff.test (original)
+++ lld/trunk/test/COFF/pdb-diff.test Mon Jul 31 12:36:08 2017
@@ -25,7 +25,7 @@ CHECK-NEXT: | Stream Directory
CHECK-NEXT: |------------------------------+---|
CHECK-NEXT: | File | |
CHECK-NEXT: |------------------------------+---|
-CHECK-NEXT: | Stream Count | D |
+CHECK-NEXT: | Stream Count | I |
CHECK-NEXT: |------------------------------+---|
CHECK-NEXT: | Old MSF Directory | I |
CHECK-NEXT: |------------------------------+---|
@@ -57,7 +57,7 @@ CHECK-NEXT: | Public Symbol
CHECK-NEXT: |------------------------------+---|
CHECK-NEXT: | Public Symbol Records | {{[EI]}} |
CHECK-NEXT: |------------------------------+---|
-CHECK-NEXT: | Global Symbol Hash | D |
+CHECK-NEXT: | Global Symbol Hash | {{[EI]}} |
CHECK-NEXT: |------------------------------+---|
CHECK-NEXT: ------------------------------------
CHECK-NEXT: | String Table |
@@ -152,7 +152,7 @@ CHECK-NEXT: |
CHECK-NEXT: |----------------------------------------+---|
CHECK-NEXT: | DBG (SectionHdrOrig) | I |
CHECK-NEXT: |----------------------------------------+---|
-CHECK-NEXT: | Globals Stream | D |
+CHECK-NEXT: | Globals Stream | {{[EI]}} |
CHECK-NEXT: |----------------------------------------+---|
CHECK-NEXT: | Publics Stream | {{[EI]}} |
CHECK-NEXT: |----------------------------------------+---|
@@ -186,7 +186,7 @@ CHECK-NEXT: | - Pdb F
CHECK-NEXT: |----------------------------------------+---|
CHECK-NEXT: | - Source File Name Index | I |
CHECK-NEXT: |----------------------------------------+---|
-CHECK-NEXT: | - Symbol Byte Size | D |
+CHECK-NEXT: | - Symbol Byte Size |
CHECK-NEXT: |----------------------------------------+---|
CHECK-NEXT: | Module "* Linker *" |
CHECK-NEXT: |----------------------------------------+---|
More information about the llvm-commits
mailing list