diff options
author | Zachary Turner <zturner@google.com> | 2017-06-12 21:34:53 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-06-12 21:34:53 +0000 |
commit | 990d0c81587c2d9a3e2338998d551ce73e9a68ad (patch) | |
tree | 35b5f9a41c527cc5071596ec9c994b861be89a58 /llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp | |
parent | 4b027e8f89a273fdfb275a5eee20a3eea078e4ad (diff) | |
download | bcm5719-llvm-990d0c81587c2d9a3e2338998d551ce73e9a68ad.tar.gz bcm5719-llvm-990d0c81587c2d9a3e2338998d551ce73e9a68ad.zip |
[llvm-pdbdump] Don't fail on PDBs with no ID stream.
Older PDBs don't have this. Its presence is detected by using
the various "feature" flags that come at the end of the PDB
Stream. Detect this, and don't try to dump the ID stream if the
features tells us it's not present.
llvm-svn: 305235
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp b/llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp index 7c6069652da..a3979d480bf 100644 --- a/llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp @@ -102,6 +102,10 @@ InfoStream::named_streams() const { return NamedStreams.entries(); } +bool InfoStream::containsIdStream() const { + return !!(Features & PdbFeatureContainsIdStream); +} + PdbRaw_ImplVer InfoStream::getVersion() const { return static_cast<PdbRaw_ImplVer>(Version); } |