diff options
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp b/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp index a5c383e..1385e91 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp @@ -171,8 +171,10 @@ Error PDBFile::parseStreamData() { if (auto EC = Reader.readArray(StreamSizes, NumStreams)) return EC; for (uint32_t I = 0; I < NumStreams; ++I) { + uint32_t StreamSize = getStreamByteSize(I); + // FIXME: What does StreamSize ~0U mean? uint64_t NumExpectedStreamBlocks = - bytesToBlocks(getStreamByteSize(I), SB->BlockSize); + StreamSize == UINT32_MAX ? 0 : bytesToBlocks(StreamSize, SB->BlockSize); // For convenience, we store the block array contiguously. This is because // if someone calls setStreamMap(), it is more convenient to be able to call @@ -331,4 +333,4 @@ void PDBFile::setStreamMap(ArrayRef<ArrayRef<support::ulittle32_t>> Blocks) { StreamMap = Blocks; } -void PDBFile::commit() {}
\ No newline at end of file +void PDBFile::commit() {} |