<rdar://problem/12560257>

Fixed arrays with a size of 1 to correctly have 1 member when DW_AT_upper_bound was set to zero and no other attributes were set.

llvm-svn: 169431
This commit is contained in:
Greg Clayton 2012-12-05 21:59:39 +00:00
parent f75d498a3c
commit e6a07793e0
1 changed files with 5 additions and 2 deletions

View File

@ -4253,8 +4253,11 @@ SymbolFileDWARF::ParseChildArrayInfo
}
}
if (upper_bound > lower_bound)
num_elements = upper_bound - lower_bound + 1;
if (num_elements == 0)
{
if (upper_bound >= lower_bound)
num_elements = upper_bound - lower_bound + 1;
}
element_orders.push_back (num_elements);
}