diff options
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 3 | ||||
| -rw-r--r-- | lldb/test/lang/c/struct_types/main.c | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 371343c7f4b..20443244dec 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -6162,9 +6162,6 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu, { std::vector<uint64_t> element_orders; ParseChildArrayInfo(sc, dwarf_cu, die, first_index, element_orders, byte_stride, bit_stride); - // We have an array that claims to have no members, lets give it at least one member... - if (element_orders.empty()) - element_orders.push_back (1); if (byte_stride == 0 && bit_stride == 0) byte_stride = element_type->GetByteSize(); clang_type_t array_element_type = element_type->GetClangForwardType(); diff --git a/lldb/test/lang/c/struct_types/main.c b/lldb/test/lang/c/struct_types/main.c index d521ec7a804..b3be185dc1a 100644 --- a/lldb/test/lang/c/struct_types/main.c +++ b/lldb/test/lang/c/struct_types/main.c @@ -10,6 +10,7 @@ int main (int argc, char const *argv[]) { struct point_tag { int x; + char padding[0]; int y; }; // Set break point at this line. @@ -17,7 +18,7 @@ int main (int argc, char const *argv[]) struct point_tag bottom_left; struct point_tag top_right; }; - struct point_tag pt = { 2, 3 }; // This is the first executable statement. - struct rect_tag rect = {{1,2}, {3,4}}; + struct point_tag pt = { 2, {}, 3 }; // This is the first executable statement. + struct rect_tag rect = {{1, {}, 2}, {3, {}, 4}}; return 0; } |

