summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/include/lldb/Symbol/SymbolFile.h6
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/lldb/include/lldb/Symbol/SymbolFile.h b/lldb/include/lldb/Symbol/SymbolFile.h
index 5d607989f44..e2f18d81c3e 100644
--- a/lldb/include/lldb/Symbol/SymbolFile.h
+++ b/lldb/include/lldb/Symbol/SymbolFile.h
@@ -132,10 +132,10 @@ public:
/// The characteristics of an array type.
struct ArrayInfo {
- int64_t first_index;
+ int64_t first_index = 0;
llvm::SmallVector<uint64_t, 1> element_orders;
- uint32_t byte_stride;
- uint32_t bit_stride;
+ uint32_t byte_stride = 0;
+ uint32_t bit_stride = 0;
};
/// If \c type_uid points to an array type, return its characteristics.
/// To support variable-length array types, this function takes an
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py b/lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py
index a47e6c311d4..da3a46ac0bc 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py
@@ -175,6 +175,8 @@ class ArrayTypesTestCase(TestBase):
self.DebugSBValue(variable)
self.assertTrue(variable.GetNumChildren() == 4,
"Variable 'strings' should have 4 children")
+ byte_size = variable.GetByteSize()
+ self.assertTrue(byte_size >= 4*4 and byte_size <= 1024)
child3 = variable.GetChildAtIndex(3)
self.DebugSBValue(child3)
OpenPOWER on IntegriCloud