summaryrefslogtreecommitdiff
path: root/include/llvm/DebugInfo/PDB/PDBSymbol.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/DebugInfo/PDB/PDBSymbol.h')
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbol.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbol.h b/include/llvm/DebugInfo/PDB/PDBSymbol.h
index b114b7afb0b03..9e883d2f99a7a 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbol.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbol.h
@@ -89,6 +89,8 @@ public:
template <typename T> std::unique_ptr<T> findOneChild() const {
auto Enumerator(findAllChildren<T>());
+ if (!Enumerator)
+ return nullptr;
return Enumerator->getNext();
}
@@ -97,6 +99,8 @@ public:
template <typename T>
std::unique_ptr<ConcreteSymbolEnumerator<T>> findAllChildren() const {
auto BaseIter = RawSymbol->findChildren(T::Tag);
+ if (!BaseIter)
+ return nullptr;
return llvm::make_unique<ConcreteSymbolEnumerator<T>>(std::move(BaseIter));
}
std::unique_ptr<IPDBEnumSymbols> findAllChildren(PDB_SymType Type) const;