[pdb] Fix the TPI stream size computation.
authorZachary Turner <zturner@google.com>
Thu, 15 Sep 2016 18:22:21 +0000 (18:22 +0000)
committerZachary Turner <zturner@google.com>
Thu, 15 Sep 2016 18:22:21 +0000 (18:22 +0000)
We were inadvertently adding the size of the hash value stream to
the size of the TPI stream, even though the hash value stream is
an entirely separate stream.

llvm-svn: 281636

llvm/lib/DebugInfo/PDB/Raw/TpiStreamBuilder.cpp

index ee9e89b..aa05938 100644 (file)
@@ -64,8 +64,7 @@ Error TpiStreamBuilder::finalize() {
 }
 
 uint32_t TpiStreamBuilder::calculateSerializedLength() const {
-  return sizeof(TpiStreamHeader) + TypeRecordStream.getLength() +
-         calculateHashBufferSize();
+  return sizeof(TpiStreamHeader) + TypeRecordStream.getLength();
 }
 
 uint32_t TpiStreamBuilder::calculateHashBufferSize() const {