[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
llvm-svn: 309608
diff --git a/llvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp b/llvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp
index 25076e4..0fe583b 100644
--- a/llvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp
@@ -49,6 +49,10 @@
SectionMap = SecMap;
}
+void DbiStreamBuilder::setGlobalsStreamIndex(uint32_t Index) {
+ GlobalsStreamIndex = Index;
+}
+
void DbiStreamBuilder::setSymbolRecordStreamIndex(uint32_t Index) {
SymRecordStreamIndex = Index;
}
@@ -270,7 +274,7 @@
H->SymRecordStreamIndex = SymRecordStreamIndex;
H->PublicSymbolStreamIndex = PublicsStreamIndex;
H->MFCTypeServerIndex = kInvalidStreamIndex;
- H->GlobalSymbolStreamIndex = kInvalidStreamIndex;
+ H->GlobalSymbolStreamIndex = GlobalsStreamIndex;
Header = H;
return Error::success();