Fix a bug in MappedBlockStream.
authorZachary Turner <zturner@google.com>
Thu, 25 May 2017 21:12:00 +0000 (21:12 +0000)
committerZachary Turner <zturner@google.com>
Thu, 25 May 2017 21:12:00 +0000 (21:12 +0000)
commitc4e4b7e31e8efc917352286aa6e22d78b659d44d
treeba26d54d6792bb650889f111fc074cec63a4e390
parent1c154a6107804f4da2bf6baf7b2eeb0ee996dcd3
Fix a bug in MappedBlockStream.

It was using the number of blocks of the entire PDB file as the number
of blocks of each stream that was created.  This was only an issue in
the readLongestContiguousChunk function, which  was never called prior.
This bug surfaced when I updated an algorithm to use this function and
the algorithm broke.

llvm-svn: 303916
llvm/include/llvm/DebugInfo/MSF/MappedBlockStream.h
llvm/lib/DebugInfo/MSF/MappedBlockStream.cpp
llvm/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp