diff options
author | Eric Christopher <echristo@apple.com> | 2012-03-16 00:21:54 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2012-03-16 00:21:54 +0000 |
commit | a4a0cf8394627f8380c9e14b20900001efd56dee (patch) | |
tree | f432840fedeed4117b0df2d6e5f3b22c68b3377f /llvm/lib/Analysis | |
parent | ecbe8b4fabf5c089700b36b4631994afd75d5b24 (diff) | |
download | bcm5719-llvm-a4a0cf8394627f8380c9e14b20900001efd56dee.tar.gz bcm5719-llvm-a4a0cf8394627f8380c9e14b20900001efd56dee.zip |
Do the right thing on NULL uint64 fields.
Patch by Clemens Hammacher!
Fixes PR12243
llvm-svn: 152880
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/DebugInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp index 585a087a02a..e30c0a9b330 100644 --- a/llvm/lib/Analysis/DebugInfo.cpp +++ b/llvm/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; |