diff options
| author | Zachary Turner <zturner@google.com> | 2017-08-02 22:31:39 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2017-08-02 22:31:39 +0000 |
| commit | 9fb9d71d3e6a0515cb0ad416bc4400d47801888a (patch) | |
| tree | f638998635c8f45b950a441be478e14b12b34c87 /llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp | |
| parent | 018338e503880ac56457692ad2dee3c38945d629 (diff) | |
| download | bcm5719-llvm-9fb9d71d3e6a0515cb0ad416bc4400d47801888a.tar.gz bcm5719-llvm-9fb9d71d3e6a0515cb0ad416bc4400d47801888a.zip | |
[pdb/lld] Write a valid FPM.
The PDB reserves certain blocks for the FPM that describe which
blocks in the file are allocated and which are free. We weren't
filling that out at all, and in some cases we were even stomping
it with incorrect data. This patch writes a correct FPM.
Differential Revision: https://reviews.llvm.org/D36235
llvm-svn: 309896
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp')
| -rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp b/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp index e0bb460d21c..de460d03e6b 100644 --- a/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp @@ -150,8 +150,7 @@ Error PDBFile::parseFileHeaders() { MappedBlockStream::createFpmStream(ContainerLayout, *Buffer, Allocator); BinaryStreamReader FpmReader(*FpmStream); ArrayRef<uint8_t> FpmBytes; - if (auto EC = FpmReader.readBytes(FpmBytes, - msf::getFullFpmByteSize(ContainerLayout))) + if (auto EC = FpmReader.readBytes(FpmBytes, FpmReader.bytesRemaining())) return EC; uint32_t BlocksRemaining = getBlockCount(); uint32_t BI = 0; |

