summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/Native/DbiStream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/DbiStream.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/Native/DbiStream.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/DbiStream.cpp b/llvm/lib/DebugInfo/PDB/Native/DbiStream.cpp
index ea15bcd01f5..4eb16804171 100644
--- a/llvm/lib/DebugInfo/PDB/Native/DbiStream.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/DbiStream.cpp
@@ -333,15 +333,11 @@ DbiStream::createIndexedStreamForHeaderType(PDBFile *Pdb,
uint32_t StreamNum = getDebugStreamIndex(Type);
- // This means there is no such stream
+ // This means there is no such stream.
if (StreamNum == kInvalidStreamIndex)
return nullptr;
- if (StreamNum >= Pdb->getNumStreams())
- return make_error<RawError>(raw_error_code::no_stream);
-
- return MappedBlockStream::createIndexedStream(
- Pdb->getMsfLayout(), Pdb->getMsfBuffer(), StreamNum, Pdb->getAllocator());
+ return Pdb->safelyCreateIndexedStream(StreamNum);
}
BinarySubstreamRef DbiStream::getSectionContributionData() const {
OpenPOWER on IntegriCloud