/// 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;
// 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,
CompilerType
TypeSystemClang::GetArrayElementType(lldb::opaque_compiler_type_t type,
- uint64_t *stride,
ExecutionContextScope *exe_scope) {
if (type) {
clang::QualType qual_type(GetQualType(type));
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<uint64_t> size = element_type.GetByteSize(exe_scope))
- *stride = *size;
-
- return element_type;
+ return GetType(clang::QualType(array_eletype, 0));
}
return CompilerType();
}
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,
// 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();
}