[llvm] r273504 - [pdb] Treat a stream size of ~0U as 0
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 22 15:42:25 PDT 2016
Author: rnk
Date: Wed Jun 22 17:42:24 2016
New Revision: 273504
URL: http://llvm.org/viewvc/llvm-project?rev=273504&view=rev
Log:
[pdb] Treat a stream size of ~0U as 0
My PDBs always have this size for stream 11. Not sure why.
Modified:
llvm/trunk/lib/DebugInfo/PDB/Raw/PDBFile.cpp
Modified: llvm/trunk/lib/DebugInfo/PDB/Raw/PDBFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Raw/PDBFile.cpp?rev=273504&r1=273503&r2=273504&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Raw/PDBFile.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Raw/PDBFile.cpp Wed Jun 22 17:42:24 2016
@@ -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<Arra
StreamMap = Blocks;
}
-void PDBFile::commit() {}
\ No newline at end of file
+void PDBFile::commit() {}
More information about the llvm-commits
mailing list