summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-09-14 23:00:02 +0000
committerZachary Turner <zturner@google.com>2016-09-14 23:00:02 +0000
commit620961deb9bc4c0415d56bed9b2fe20391bd2ad2 (patch)
treec313b23899ec22d2871cedecf1b65b93905cfa3b /llvm/lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp
parent31263731da2214579540198ae96c0990b315d0ed (diff)
downloadbcm5719-llvm-620961deb9bc4c0415d56bed9b2fe20391bd2ad2.tar.gz
bcm5719-llvm-620961deb9bc4c0415d56bed9b2fe20391bd2ad2.zip
[pdb] Write TPI hash values to the TPI stream.
This completes being able to write all the interesting values of a PDB TPI stream. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D24370 llvm-svn: 281555
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp b/llvm/lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp
index ebe88dfa587..40e3c7901a9 100644
--- a/llvm/lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp
+++ b/llvm/lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp
@@ -50,36 +50,33 @@ MSFBuilder &PDBFileBuilder::getMsfBuilder() { return *Msf; }
InfoStreamBuilder &PDBFileBuilder::getInfoBuilder() {
if (!Info)
- Info = llvm::make_unique<InfoStreamBuilder>();
+ Info = llvm::make_unique<InfoStreamBuilder>(*Msf);
return *Info;
}
DbiStreamBuilder &PDBFileBuilder::getDbiBuilder() {
if (!Dbi)
- Dbi = llvm::make_unique<DbiStreamBuilder>(Allocator);
+ Dbi = llvm::make_unique<DbiStreamBuilder>(*Msf);
return *Dbi;
}
TpiStreamBuilder &PDBFileBuilder::getTpiBuilder() {
if (!Tpi)
- Tpi = llvm::make_unique<TpiStreamBuilder>(Allocator);
+ Tpi = llvm::make_unique<TpiStreamBuilder>(*Msf);
return *Tpi;
}
Expected<msf::MSFLayout> PDBFileBuilder::finalizeMsfLayout() const {
if (Info) {
- uint32_t Length = Info->calculateSerializedLength();
- if (auto EC = Msf->setStreamSize(StreamPDB, Length))
+ if (auto EC = Info->finalizeMsfLayout())
return std::move(EC);
}
if (Dbi) {
- uint32_t Length = Dbi->calculateSerializedLength();
- if (auto EC = Msf->setStreamSize(StreamDBI, Length))
+ if (auto EC = Dbi->finalizeMsfLayout())
return std::move(EC);
}
if (Tpi) {
- uint32_t Length = Tpi->calculateSerializedLength();
- if (auto EC = Msf->setStreamSize(StreamTPI, Length))
+ if (auto EC = Tpi->finalizeMsfLayout())
return std::move(EC);
}
OpenPOWER on IntegriCloud