diff options
author | Greg Clayton <gclayton@apple.com> | 2012-12-05 21:59:39 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-12-05 21:59:39 +0000 |
commit | e6a07793e03c7a4bf26d7e70758752a5f50ff1ab (patch) | |
tree | e17fa5907738bb1dd095dc084a8b819354c0918c | |
parent | f75d498a3c916a550f0dadf050512ac4dcd2d77f (diff) | |
download | bcm5719-llvm-e6a07793e03c7a4bf26d7e70758752a5f50ff1ab.tar.gz bcm5719-llvm-e6a07793e03c7a4bf26d7e70758752a5f50ff1ab.zip |
<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
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index ca7d24a568d..cd84f631a85 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -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); } |