diff options
author | Zachary Turner <zturner@google.com> | 2016-05-28 05:21:57 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-05-28 05:21:57 +0000 |
commit | 0d43c1c339ab5532c4527e92dc852b6e0f3f1788 (patch) | |
tree | 321e2a7cb797ccc76f6d806872e8a12ee8fd475b /llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp | |
parent | 9a9a3169e35306f396e2d690b157ad03a9521650 (diff) | |
download | llvm-0d43c1c339ab5532c4527e92dc852b6e0f3f1788.zip llvm-0d43c1c339ab5532c4527e92dc852b6e0f3f1788.tar.gz llvm-0d43c1c339ab5532c4527e92dc852b6e0f3f1788.tar.bz2 |
[pdb] Finish conversion to zero copy pdb access.
This converts remaining uses of ByteStream, which was still
left in the symbol stream and type stream, to using the new
StreamInterface zero-copy classes.
RecordIterator is finally deleted, so this is the only way left
now. Additionally, more error checking is added when iterating
the various streams.
With this, the transition to zero copy pdb access is complete.
llvm-svn: 271101
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp b/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp index 3345ab2..6478ad1 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp @@ -92,7 +92,7 @@ Error TpiStream::reload() { HashFunction = HashBufferV8; // The actual type records themselves come from this stream - if (auto EC = RecordsBuffer.load(Reader, Header->TypeRecordBytes)) + if (auto EC = Reader.readArray(TypeRecords, Header->TypeRecordBytes)) return EC; // Hash indices, hash values, etc come from the hash stream. @@ -136,6 +136,7 @@ uint16_t TpiStream::getTypeHashStreamAuxIndex() const { return Header->HashAuxStreamIndex; } -iterator_range<codeview::TypeIterator> TpiStream::types(bool *HadError) const { - return codeview::makeTypeRange(RecordsBuffer.data(), /*HadError=*/HadError); +iterator_range<codeview::CVTypeArray::Iterator> +TpiStream::types(bool *HadError) const { + return llvm::make_range(TypeRecords.begin(HadError), TypeRecords.end()); } |