1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2025-03-20 11:32:33 +00:00

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
This commit is contained in:
Eric Christopher 2012-03-16 00:21:54 +00:00
parent b99ea7cb3f
commit 75df9f23fa
2 changed files with 7 additions and 1 deletions
lib/Analysis
test/DebugInfo

@ -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;

@ -0,0 +1,6 @@
; RUN: llc
!llvm.dbg.cu = !{!0}
!0 = metadata !{null, null, null}