Tolerate a null parent pointer.

llvm-svn: 116533
This commit is contained in:
Dan Gohman 2010-10-14 22:55:57 +00:00
parent 8f92f0a35c
commit 31a01ee3cb
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ namespace {
TBAANode getParent() const {
if (Node->getNumOperands() < 2)
return TBAANode();
MDNode *P = dyn_cast<MDNode>(Node->getOperand(1));
MDNode *P = dyn_cast_or_null<MDNode>(Node->getOperand(1));
if (!P)
return TBAANode();
// Ok, this node has a valid parent. Return it.