diff options
| author | Zachary Turner <zturner@google.com> | 2016-05-27 18:47:20 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2016-05-27 18:47:20 +0000 |
| commit | 1de49c9ffde764550981d5c65eccfe887aa38f08 (patch) | |
| tree | eb526b38e36eb5e92b749f47a7296a4635c11f02 /llvm/lib/DebugInfo/PDB/Raw/DbiStream.cpp | |
| parent | 6c247c8cc8054c0c4cc18f1d7c21c5fdb8b1d0e3 (diff) | |
| download | bcm5719-llvm-1de49c9ffde764550981d5c65eccfe887aa38f08.tar.gz bcm5719-llvm-1de49c9ffde764550981d5c65eccfe887aa38f08.zip | |
Resubmit "[pdb] Allow zero-copy read support for symbol streams.""
Due to differences in template instantiation rules, it is not
portable to static_assert(false) inside of an invalid specialization
of a template. Instead I just =delete the method so that it can't
be used, and leave a comment that it must be explicitly specialized.
llvm-svn: 271027
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/DbiStream.cpp')
| -rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/DbiStream.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/DbiStream.cpp b/llvm/lib/DebugInfo/PDB/Raw/DbiStream.cpp index 35937574645..1827ab078df 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/DbiStream.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/DbiStream.cpp @@ -136,14 +136,12 @@ Error DbiStream::reload() { return make_error<RawError>(raw_error_code::corrupt_file, "DBI type server substream not aligned."); - if (auto EC = - Reader.readStreamRef(ModInfoSubstream, Header->ModiSubstreamSize)) - return EC; - // Since each ModInfo in the stream is a variable length, we have to iterate // them to know how many there actually are. - codeview::VarStreamArray ModInfoArray(ModInfoSubstream, ModInfoRecordLength); - for (auto Info : ModInfoArray) { + codeview::VarStreamArray<ModInfo> ModInfoArray; + if (auto EC = Reader.readArray(ModInfoArray, Header->ModiSubstreamSize)) + return EC; + for (auto &Info : ModInfoArray) { ModuleInfos.emplace_back(Info); } |

