aboutsummaryrefslogtreecommitdiff
path: root/lib/DebugInfo/PDB/Native/PDBFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/DebugInfo/PDB/Native/PDBFile.cpp')
-rw-r--r--lib/DebugInfo/PDB/Native/PDBFile.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/DebugInfo/PDB/Native/PDBFile.cpp b/lib/DebugInfo/PDB/Native/PDBFile.cpp
index 4f6ebb0cb342..0b6492efc70f 100644
--- a/lib/DebugInfo/PDB/Native/PDBFile.cpp
+++ b/lib/DebugInfo/PDB/Native/PDBFile.cpp
@@ -385,8 +385,11 @@ bool PDBFile::hasPDBDbiStream() const { return StreamDBI < getNumStreams(); }
bool PDBFile::hasPDBGlobalsStream() {
auto DbiS = getPDBDbiStream();
- if (!DbiS)
+ if (!DbiS) {
+ consumeError(DbiS.takeError());
return false;
+ }
+
return DbiS->getGlobalSymbolStreamIndex() < getNumStreams();
}
@@ -396,8 +399,10 @@ bool PDBFile::hasPDBIpiStream() const { return StreamIPI < getNumStreams(); }
bool PDBFile::hasPDBPublicsStream() {
auto DbiS = getPDBDbiStream();
- if (!DbiS)
+ if (!DbiS) {
+ consumeError(DbiS.takeError());
return false;
+ }
return DbiS->getPublicSymbolStreamIndex() < getNumStreams();
}