diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-03-31 05:53:47 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-03-31 05:53:47 +0000 |
| commit | 743bdca3448a303d474cba2abdc99ca0a56e705e (patch) | |
| tree | 9854f0894cb4bec2bae52df8a8a928e99c72c6c9 /llvm/lib/Analysis | |
| parent | 03e1b5ab5c712cc7f1f255168deaca5d31575de7 (diff) | |
| download | bcm5719-llvm-743bdca3448a303d474cba2abdc99ca0a56e705e.tar.gz bcm5719-llvm-743bdca3448a303d474cba2abdc99ca0a56e705e.zip | |
microoptimize this hot method, also making it more
consistent with other similar ones.
llvm-svn: 99997
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/DebugInfo.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp index fda69ac39a2..f12552d9e40 100644 --- a/llvm/lib/Analysis/DebugInfo.cpp +++ b/llvm/lib/Analysis/DebugInfo.cpp @@ -96,9 +96,8 @@ DIDescriptor DIDescriptor::getDescriptorField(unsigned Elt) const { if (DbgNode == 0) return DIDescriptor(); - if (Elt < DbgNode->getNumOperands() && DbgNode->getOperand(Elt)) - return DIDescriptor(dyn_cast<MDNode>(DbgNode->getOperand(Elt))); - + if (Elt < DbgNode->getNumOperands()) + return DIDescriptor(dyn_cast_or_null<MDNode>(DbgNode->getOperand(Elt))); return DIDescriptor(); } |

