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/tools/llvm-pdbutil/LLVMOutputStyle.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/tools/llvm-pdbutil/LLVMOutputStyle.cpp')
| -rw-r--r-- | llvm/tools/llvm-pdbutil/LLVMOutputStyle.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/tools/llvm-pdbutil/LLVMOutputStyle.cpp b/llvm/tools/llvm-pdbutil/LLVMOutputStyle.cpp index 824f88f8efd..444541a0773 100644 --- a/llvm/tools/llvm-pdbutil/LLVMOutputStyle.cpp +++ b/llvm/tools/llvm-pdbutil/LLVMOutputStyle.cpp @@ -739,10 +739,12 @@ Error LLVMOutputStyle::dumpTpiStream(uint32_t StreamIdx) { Label = "Type Info Stream (TPI)"; VerLabel = "TPI Version"; } else if (StreamIdx == StreamIPI) { - if (!File.hasPDBIpiStream()) { - P.printString("Type Info Stream (IPI) not present"); + auto InfoS = File.getPDBInfoStream(); + if (!InfoS) + return InfoS.takeError(); + + if (!File.hasPDBIpiStream() || !InfoS->containsIdStream()) return Error::success(); - } DumpRecordBytes = opts::raw::DumpIpiRecordBytes; DumpRecords = opts::raw::DumpIpiRecords; Label = "Type Info Stream (IPI)"; |

