mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +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:
parent
b99ea7cb3f
commit
75df9f23fa
@ -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;
|
||||
|
6
test/DebugInfo/bug_null_debuginfo.ll
Normal file
6
test/DebugInfo/bug_null_debuginfo.ll
Normal file
@ -0,0 +1,6 @@
|
||||
; RUN: llc
|
||||
|
||||
|
||||
!llvm.dbg.cu = !{!0}
|
||||
|
||||
!0 = metadata !{null, null, null}
|
Loading…
x
Reference in New Issue
Block a user