mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-05 17:39:16 +00:00
Do not completely skip subrange info for a zero sized array.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79044 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
98a0104014
commit
6325a5305e
@ -731,12 +731,11 @@ void DwarfDebug::ConstructSubrangeDIE(DIE &Buffer, DISubrange SR, DIE *IndexTy){
|
||||
int64_t H = SR.getHi();
|
||||
DIE *DW_Subrange = new DIE(dwarf::DW_TAG_subrange_type);
|
||||
|
||||
if (L != H) {
|
||||
AddDIEEntry(DW_Subrange, dwarf::DW_AT_type, dwarf::DW_FORM_ref4, IndexTy);
|
||||
if (L)
|
||||
AddSInt(DW_Subrange, dwarf::DW_AT_lower_bound, 0, L);
|
||||
AddSInt(DW_Subrange, dwarf::DW_AT_upper_bound, 0, H);
|
||||
}
|
||||
AddDIEEntry(DW_Subrange, dwarf::DW_AT_type, dwarf::DW_FORM_ref4, IndexTy);
|
||||
if (L)
|
||||
AddSInt(DW_Subrange, dwarf::DW_AT_lower_bound, 0, L);
|
||||
if (H)
|
||||
AddSInt(DW_Subrange, dwarf::DW_AT_upper_bound, 0, H);
|
||||
|
||||
Buffer.AddChild(DW_Subrange);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user