mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
Tolerate a null parent pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116533 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4d156d3a25
commit
c05d8aa6db
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user