Do not completely skip subrange info for a zero sized array.

llvm-svn: 79044
This commit is contained in:
Devang Patel 2009-08-14 20:59:16 +00:00
parent 4e97ccc132
commit b6add4ace3

View File

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