diff options
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/InfoStreamBuilder.cpp')
| -rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/InfoStreamBuilder.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/InfoStreamBuilder.cpp b/llvm/lib/DebugInfo/PDB/Raw/InfoStreamBuilder.cpp index 5a0e835dd56..7be9cc32db9 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/InfoStreamBuilder.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/InfoStreamBuilder.cpp @@ -28,6 +28,10 @@ void InfoStreamBuilder::setAge(uint32_t A) { Age = A; } void InfoStreamBuilder::setGuid(PDB_UniqueId G) { Guid = G; } +NameMapBuilder &InfoStreamBuilder::getNamedStreamsBuilder() { + return NamedStreams; +} + uint32_t InfoStreamBuilder::calculateSerializedLength() const { return sizeof(InfoStream::HeaderInfo) + NamedStreams.calculateSerializedLength(); @@ -55,5 +59,9 @@ Expected<std::unique_ptr<InfoStream>> InfoStreamBuilder::build(PDBFile &File) { Info->Signature = *Sig; Info->Age = *Age; Info->Guid = *Guid; + auto NS = NamedStreams.build(); + if (!NS) + return NS.takeError(); + Info->NamedStreams = **NS; return std::move(Info); } |

