summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2019-06-23 21:36:31 +0000
committerpatrick <patrick@openbsd.org>2019-06-23 21:36:31 +0000
commit23f101f37937a1bd4a29726cab2f76e0fb038b35 (patch)
treef7da7d6b32c2e07114da399150bfa88d72187012 /gnu/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
parentsort previous; ok deraadt (diff)
downloadwireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.tar.xz
wireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.zip
Import LLVM 8.0.0 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp')
-rw-r--r--gnu/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/gnu/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp b/gnu/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
index 78b11937f05..a1f8786ff12 100644
--- a/gnu/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
+++ b/gnu/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
@@ -125,7 +125,7 @@ Error PDBFile::parseFileHeaders() {
if (auto EC = Reader.readObject(SB)) {
consumeError(std::move(EC));
return make_error<RawError>(raw_error_code::corrupt_file,
- "Does not contain superblock");
+ "MSF superblock is missing");
}
if (auto EC = msf::validateSuperBlock(*SB))
@@ -401,7 +401,9 @@ uint32_t PDBFile::getPointerSize() {
return 4;
}
-bool PDBFile::hasPDBDbiStream() const { return StreamDBI < getNumStreams(); }
+bool PDBFile::hasPDBDbiStream() const {
+ return StreamDBI < getNumStreams() && getStreamByteSize(StreamDBI) > 0;
+}
bool PDBFile::hasPDBGlobalsStream() {
auto DbiS = getPDBDbiStream();