forked from OSchip/llvm-project
Do the right thing on NULL uint64 fields.
Patch by Clemens Hammacher! Fixes PR12243 llvm-svn: 152880
This commit is contained in:
parent
ecbe8b4fab
commit
a4a0cf8394
|
@ -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}
|
Loading…
Reference in New Issue