summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp b/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp
index 11e10a58e5d..9d8a45ebc88 100644
--- a/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp
+++ b/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp
@@ -13,6 +13,7 @@
#include "llvm/DebugInfo/CodeView/StreamReader.h"
#include "llvm/DebugInfo/CodeView/TypeIndex.h"
#include "llvm/DebugInfo/CodeView/TypeRecord.h"
+#include "llvm/DebugInfo/PDB/Raw/IndexedStreamData.h"
#include "llvm/DebugInfo/PDB/Raw/MappedBlockStream.h"
#include "llvm/DebugInfo/PDB/Raw/PDBFile.h"
#include "llvm/DebugInfo/PDB/Raw/RawConstants.h"
@@ -61,8 +62,10 @@ struct TpiStream::HeaderInfo {
EmbeddedBuf HashAdjBuffer;
};
-TpiStream::TpiStream(PDBFile &File, uint32_t StreamIdx)
- : Pdb(File), Stream(StreamIdx, File), HashFunction(nullptr) {}
+TpiStream::TpiStream(const PDBFile &File, uint32_t StreamIdx)
+ : Pdb(File),
+ Stream(llvm::make_unique<IndexedStreamData>(StreamIdx, File), File),
+ HashFunction(nullptr) {}
TpiStream::~TpiStream() {}
@@ -101,7 +104,8 @@ Error TpiStream::reload() {
return EC;
// Hash indices, hash values, etc come from the hash stream.
- HashStream.reset(new MappedBlockStream(Header->HashStreamIndex, Pdb));
+ HashStream.reset(new MappedBlockStream(
+ llvm::make_unique<IndexedStreamData>(Header->HashStreamIndex, Pdb), Pdb));
codeview::StreamReader HSR(*HashStream);
uint32_t NumHashValues = Header->HashValueBuffer.Length / sizeof(ulittle32_t);
OpenPOWER on IntegriCloud