[llvm-commits] [llvm] r116533 - /llvm/trunk/lib/Analysis/TypeBasedAliasAnalysis.cpp
Dan Gohman
gohman at apple.com
Thu Oct 14 15:55:57 PDT 2010
Author: djg
Date: Thu Oct 14 17:55:57 2010
New Revision: 116533
URL: http://llvm.org/viewvc/llvm-project?rev=116533&view=rev
Log:
Tolerate a null parent pointer.
Modified:
llvm/trunk/lib/Analysis/TypeBasedAliasAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/TypeBasedAliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/TypeBasedAliasAnalysis.cpp?rev=116533&r1=116532&r2=116533&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/TypeBasedAliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/TypeBasedAliasAnalysis.cpp Thu Oct 14 17:55:57 2010
@@ -52,7 +52,7 @@
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.
More information about the llvm-commits
mailing list