summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/DIA
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-06-08 16:00:40 +0000
committerZachary Turner <zturner@google.com>2017-06-08 16:00:40 +0000
commit15eb237fd36f7b56320bf1acacb4f8f62e6589b3 (patch)
tree79cb7504b8c1293fd788be2ce9851230e09d1210 /llvm/lib/DebugInfo/PDB/DIA
parent5579eb0a7ad124f5a1b3b86a8f7ecfacd96fa3c6 (diff)
downloadbcm5719-llvm-15eb237fd36f7b56320bf1acacb4f8f62e6589b3.tar.gz
bcm5719-llvm-15eb237fd36f7b56320bf1acacb4f8f62e6589b3.zip
[PDB] Don't crash on /debug:fastlink PDBs.
Apparently support for /debug:fastlink PDBs isn't part of the DIA SDK (!), and it was causing llvm-pdbdump to crash because we weren't checking for a null pointer return value. This manifests when calling findChildren on the IDiaSymbol, and it returns E_NOTIMPL. llvm-svn: 304982
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/DIA')
-rw-r--r--llvm/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp b/llvm/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp
index 4e2474c51cb..0b48a366bd2 100644
--- a/llvm/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp
+++ b/llvm/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp
@@ -372,8 +372,11 @@ DIARawSymbol::findChildren(PDB_SymType Type) const {
enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
CComPtr<IDiaEnumSymbols> DiaEnumerator;
- if (S_OK != Symbol->findChildrenEx(EnumVal, nullptr, nsNone, &DiaEnumerator))
- return nullptr;
+ if (S_OK !=
+ Symbol->findChildrenEx(EnumVal, nullptr, nsNone, &DiaEnumerator)) {
+ if (S_OK != Symbol->findChildren(EnumVal, nullptr, nsNone, &DiaEnumerator))
+ return nullptr;
+ }
return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
}
OpenPOWER on IntegriCloud