diff options
author | Zachary Turner <zturner@google.com> | 2016-06-08 17:26:39 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-06-08 17:26:39 +0000 |
commit | a1657a9e64c1e8df34e32ca69fac918a7d28c60a (patch) | |
tree | 74993d26964f0f2f28bed1a30e85b19401a2f34e /llvm/lib/DebugInfo/PDB/Raw/ModStream.cpp | |
parent | ced0853b468dadcf50ad5dae68017e3cd9c86bda (diff) | |
download | bcm5719-llvm-a1657a9e64c1e8df34e32ca69fac918a7d28c60a.tar.gz bcm5719-llvm-a1657a9e64c1e8df34e32ca69fac918a7d28c60a.zip |
[pdb] Handle stream index errors better.
Reviewed By: ruiu
Differential Revision: http://reviews.llvm.org/D21128
llvm-svn: 272172
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/ModStream.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/ModStream.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/ModStream.cpp b/llvm/lib/DebugInfo/PDB/Raw/ModStream.cpp index 57c455e0a00..89673d247f2 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/ModStream.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/ModStream.cpp @@ -19,15 +19,14 @@ using namespace llvm; using namespace llvm::pdb; -ModStream::ModStream(const PDBFile &File, const ModInfo &Module) - : Mod(Module), Stream(llvm::make_unique<IndexedStreamData>( - Module.getModuleStreamIndex(), File), - File) {} +ModStream::ModStream(const ModInfo &Module, + std::unique_ptr<MappedBlockStream> Stream) + : Mod(Module), Stream(std::move(Stream)) {} ModStream::~ModStream() {} Error ModStream::reload() { - codeview::StreamReader Reader(Stream); + codeview::StreamReader Reader(*Stream); uint32_t SymbolSize = Mod.getSymbolDebugInfoByteSize(); uint32_t C11Size = Mod.getLineInfoByteSize(); |