aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-03-16 00:21:54 +0000
committerEric Christopher <echristo@apple.com>2012-03-16 00:21:54 +0000
commit75df9f23fa7e3c4e02753fb0405d69cd0d68e0ef (patch)
tree9b4243b6e2def9cc8204bc7d129a756edbcfc116 /lib/Analysis
parentb99ea7cb3fe8af46bdc2ad68550632f5c16bdaa9 (diff)
downloadexternal_llvm-75df9f23fa7e3c4e02753fb0405d69cd0d68e0ef.zip
external_llvm-75df9f23fa7e3c4e02753fb0405d69cd0d68e0ef.tar.gz
external_llvm-75df9f23fa7e3c4e02753fb0405d69cd0d68e0ef.tar.bz2
Do the right thing on NULL uint64 fields.
Patch by Clemens Hammacher! Fixes PR12243 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152880 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/DebugInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 585a087..e30c0a9 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -68,7 +68,7 @@ uint64_t DIDescriptor::getUInt64Field(unsigned Elt) const {
return 0;
if (Elt < DbgNode->getNumOperands())
- if (ConstantInt *CI = dyn_cast<ConstantInt>(DbgNode->getOperand(Elt)))
+ if (ConstantInt *CI = dyn_cast_or_null<ConstantInt>(DbgNode->getOperand(Elt)))
return CI->getZExtValue();
return 0;