mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-03 08:51:43 +00:00
Do the right thing on NULL uint64 fields.
Patch by Clemens Hammacher! Fixes PR12243 llvm-svn: 152880
This commit is contained in:
parent
4a8d3b5eb5
commit
40cd87af9e
@ -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…
Reference in New Issue
Block a user