summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/Raw/PublicsStream.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-06-08 17:26:39 +0000
committerZachary Turner <zturner@google.com>2016-06-08 17:26:39 +0000
commita1657a9e64c1e8df34e32ca69fac918a7d28c60a (patch)
tree74993d26964f0f2f28bed1a30e85b19401a2f34e /llvm/lib/DebugInfo/PDB/Raw/PublicsStream.cpp
parentced0853b468dadcf50ad5dae68017e3cd9c86bda (diff)
downloadbcm5719-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/PublicsStream.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/Raw/PublicsStream.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/PublicsStream.cpp b/llvm/lib/DebugInfo/PDB/Raw/PublicsStream.cpp
index e3e100806ee..f768c01d4eb 100644
--- a/llvm/lib/DebugInfo/PDB/Raw/PublicsStream.cpp
+++ b/llvm/lib/DebugInfo/PDB/Raw/PublicsStream.cpp
@@ -71,9 +71,9 @@ struct PublicsStream::GSIHashHeader {
ulittle32_t NumBuckets;
};
-PublicsStream::PublicsStream(PDBFile &File, uint32_t StreamNum)
- : Pdb(File), StreamNum(StreamNum),
- Stream(llvm::make_unique<IndexedStreamData>(StreamNum, File), File) {}
+PublicsStream::PublicsStream(PDBFile &File,
+ std::unique_ptr<MappedBlockStream> Stream)
+ : Pdb(File), Stream(std::move(Stream)) {}
PublicsStream::~PublicsStream() {}
@@ -86,7 +86,7 @@ uint32_t PublicsStream::getAddrMap() const { return Header->AddrMap; }
// we skip over the hash table which we believe contains information about
// public symbols.
Error PublicsStream::reload() {
- codeview::StreamReader Reader(Stream);
+ codeview::StreamReader Reader(*Stream);
// Check stream size.
if (Reader.bytesRemaining() < sizeof(HeaderInfo) + sizeof(GSIHashHeader))
OpenPOWER on IntegriCloud