[Lldb-commits] [lldb] r169431 - /lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Greg Clayton gclayton at apple.com
Wed Dec 5 13:59:39 PST 2012


Author: gclayton
Date: Wed Dec  5 15:59:39 2012
New Revision: 169431

URL: http://llvm.org/viewvc/llvm-project?rev=169431&view=rev
Log:
<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.


Modified:
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=169431&r1=169430&r2=169431&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Wed Dec  5 15:59:39 2012
@@ -4253,8 +4253,11 @@
                         }
                     }
 
-                    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);
                 }





More information about the lldb-commits mailing list