microoptimize this hot method, also making it more

consistent with other similar ones.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99997 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-03-31 05:53:47 +00:00
parent ff741ab709
commit 7a2f3e0b46

View File

@@ -96,9 +96,8 @@ DIDescriptor DIDescriptor::getDescriptorField(unsigned Elt) const {
if (DbgNode == 0) if (DbgNode == 0)
return DIDescriptor(); return DIDescriptor();
if (Elt < DbgNode->getNumOperands() && DbgNode->getOperand(Elt)) if (Elt < DbgNode->getNumOperands())
return DIDescriptor(dyn_cast<MDNode>(DbgNode->getOperand(Elt))); return DIDescriptor(dyn_cast_or_null<MDNode>(DbgNode->getOperand(Elt)));
return DIDescriptor(); return DIDescriptor();
} }