From 990d0c81587c2d9a3e2338998d551ce73e9a68ad Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Mon, 12 Jun 2017 21:34:53 +0000 Subject: [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 --- llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp') diff --git a/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp b/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp index 58c538d968c..4ab7cd39b29 100644 --- a/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp +++ b/llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp @@ -293,6 +293,12 @@ Error YAMLOutputStyle::dumpIpiStream() { if (!opts::pdb2yaml::IpiStream) return Error::success(); + auto InfoS = File.getPDBInfoStream(); + if (!InfoS) + return InfoS.takeError(); + if (!InfoS->containsIdStream()) + return Error::success(); + auto IpiS = File.getPDBIpiStream(); if (!IpiS) return IpiS.takeError(); -- cgit v1.2.3