diff options
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp b/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp index de460d03e6b..414de7be91f 100644 --- a/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp @@ -85,6 +85,11 @@ uint32_t PDBFile::getNumStreams() const { return ContainerLayout.StreamSizes.size(); } +uint32_t PDBFile::getMaxStreamSize() const { + return *std::max_element(ContainerLayout.StreamSizes.begin(), + ContainerLayout.StreamSizes.end()); +} + uint32_t PDBFile::getStreamByteSize(uint32_t StreamIndex) const { return ContainerLayout.StreamSizes[StreamIndex]; } @@ -229,6 +234,13 @@ ArrayRef<support::ulittle32_t> PDBFile::getDirectoryBlockArray() const { return ContainerLayout.DirectoryBlocks; } +std::unique_ptr<MappedBlockStream> PDBFile::createIndexedStream(uint16_t SN) { + if (SN == kInvalidStreamIndex) + return nullptr; + return MappedBlockStream::createIndexedStream(ContainerLayout, *Buffer, SN, + Allocator); +} + MSFStreamLayout PDBFile::getStreamLayout(uint32_t StreamIdx) const { MSFStreamLayout Result; auto Blocks = getStreamBlockList(StreamIdx); |