summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp b/llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp
index f3f64847fcf..1ce0fe84206 100644
--- a/llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp
@@ -51,9 +51,16 @@ Error InfoStream::reload() {
Age = H->Age;
Guid = H->Guid;
- return NamedStreams.load(Reader);
+ uint32_t Offset = Reader.getOffset();
+ if (auto EC = NamedStreams.load(Reader))
+ return EC;
+ uint32_t NewOffset = Reader.getOffset();
+ NamedStreamMapByteSize = NewOffset - Offset;
+ return Error::success();
}
+uint32_t InfoStream::getStreamSize() const { return Stream->getLength(); }
+
uint32_t InfoStream::getNamedStreamIndex(llvm::StringRef Name) const {
uint32_t Result;
if (!NamedStreams.get(Name, Result))
@@ -76,6 +83,10 @@ uint32_t InfoStream::getAge() const { return Age; }
PDB_UniqueId InfoStream::getGuid() const { return Guid; }
+uint32_t InfoStream::getNamedStreamMapByteSize() const {
+ return NamedStreamMapByteSize;
+}
+
const NamedStreamMap &InfoStream::getNamedStreams() const {
return NamedStreams;
}
OpenPOWER on IntegriCloud