diff --git a/lldb/include/lldb/Symbol/CompilerType.h b/lldb/include/lldb/Symbol/CompilerType.h --- a/lldb/include/lldb/Symbol/CompilerType.h +++ b/lldb/include/lldb/Symbol/CompilerType.h @@ -177,8 +177,7 @@ /// Creating related types. /// \{ - CompilerType GetArrayElementType(ExecutionContextScope *exe_scope, - uint64_t *stride = nullptr) const; + CompilerType GetArrayElementType(ExecutionContextScope *exe_scope) const; CompilerType GetArrayType(uint64_t size) const; diff --git a/lldb/include/lldb/Symbol/TypeSystem.h b/lldb/include/lldb/Symbol/TypeSystem.h --- a/lldb/include/lldb/Symbol/TypeSystem.h +++ b/lldb/include/lldb/Symbol/TypeSystem.h @@ -218,7 +218,7 @@ // Creating related types virtual CompilerType - GetArrayElementType(lldb::opaque_compiler_type_t type, uint64_t *stride, + GetArrayElementType(lldb::opaque_compiler_type_t type, ExecutionContextScope *exe_scope) = 0; virtual CompilerType GetArrayType(lldb::opaque_compiler_type_t type, diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h --- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h +++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h @@ -689,7 +689,6 @@ uint32_t opaque_payload); CompilerType GetArrayElementType(lldb::opaque_compiler_type_t type, - uint64_t *stride, ExecutionContextScope *exe_scope) override; CompilerType GetArrayType(lldb::opaque_compiler_type_t type, diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp --- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp +++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp @@ -4090,7 +4090,6 @@ CompilerType TypeSystemClang::GetArrayElementType(lldb::opaque_compiler_type_t type, - uint64_t *stride, ExecutionContextScope *exe_scope) { if (type) { clang::QualType qual_type(GetQualType(type)); @@ -4101,14 +4100,7 @@ if (!array_eletype) return CompilerType(); - CompilerType element_type = GetType(clang::QualType(array_eletype, 0)); - - // TODO: the real stride will be >= this value.. find the real one! - if (stride) - if (Optional size = element_type.GetByteSize(exe_scope)) - *stride = *size; - - return element_type; + return GetType(clang::QualType(array_eletype, 0)); } return CompilerType(); } diff --git a/lldb/source/Symbol/CompilerType.cpp b/lldb/source/Symbol/CompilerType.cpp --- a/lldb/source/Symbol/CompilerType.cpp +++ b/lldb/source/Symbol/CompilerType.cpp @@ -317,10 +317,10 @@ // Creating related types -CompilerType CompilerType::GetArrayElementType(ExecutionContextScope *exe_scope, - uint64_t *stride) const { +CompilerType +CompilerType::GetArrayElementType(ExecutionContextScope *exe_scope) const { if (IsValid()) { - return m_type_system->GetArrayElementType(m_type, stride, exe_scope); + return m_type_system->GetArrayElementType(m_type, exe_scope); } return CompilerType(); }