diff options
author | Reid Kleckner <rnk@google.com> | 2016-06-22 22:42:24 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-06-22 22:42:24 +0000 |
commit | 5aba52ff216cb4a5cf8b9bd4c80c9ec1ce47c4cd (patch) | |
tree | f7ca863be3ae558a64a962e5954a0b96ea8d3fc7 /llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp | |
parent | 8e783eb75771e1dfd5336b891cf8f1264a575f9a (diff) | |
download | llvm-5aba52ff216cb4a5cf8b9bd4c80c9ec1ce47c4cd.zip llvm-5aba52ff216cb4a5cf8b9bd4c80c9ec1ce47c4cd.tar.gz llvm-5aba52ff216cb4a5cf8b9bd4c80c9ec1ce47c4cd.tar.bz2 |
[pdb] Treat a stream size of ~0U as 0
My PDBs always have this size for stream 11. Not sure why.
llvm-svn: 273504
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() {} |