diff options
author | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2018-08-06 19:35:00 +0000 |
---|---|---|
committer | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2018-08-06 19:35:00 +0000 |
commit | 741cc3531a6a372f8b5524362eb7930905e983bb (patch) | |
tree | 0a90eb27065bb21273accebf4ff6dab242e95121 /llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp | |
parent | 7c4f4914e34a3844475deb5cc5a9fdd481361d3e (diff) | |
download | bcm5719-llvm-741cc3531a6a372f8b5524362eb7930905e983bb.tar.gz bcm5719-llvm-741cc3531a6a372f8b5524362eb7930905e983bb.zip |
[llvm-pdbutil] Support PDBs without a DBI stream
Differential Revision: https://reviews.llvm.org/D50258
llvm-svn: 339045
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp b/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp index 78b11937f05..c5ce3e0091f 100644 --- a/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp @@ -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(); |