diff options
Diffstat (limited to 'lldb/source/API')
-rw-r--r-- | lldb/source/API/SBType.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/lldb/source/API/SBType.cpp b/lldb/source/API/SBType.cpp index 1f253804d4f..31a4eba8bf3 100644 --- a/lldb/source/API/SBType.cpp +++ b/lldb/source/API/SBType.cpp @@ -164,6 +164,14 @@ SBType::IsArrayType() } bool +SBType::IsVectorType() +{ + if (!IsValid()) + return false; + return m_opaque_sp->GetClangASTType(true).IsVectorType(nullptr, nullptr); +} + +bool SBType::IsReferenceType() { if (!IsValid()) @@ -220,7 +228,20 @@ SBType::GetArrayElementType() return SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetClangASTType(true).GetArrayElementType()))); } -bool +SBType +SBType::GetVectorElementType () +{ + SBType type_sb; + if (IsValid()) + { + ClangASTType vector_element_type; + if (m_opaque_sp->GetClangASTType(true).IsVectorType(&vector_element_type, nullptr)) + type_sb.SetSP(TypeImplSP(new TypeImpl(vector_element_type))); + } + return type_sb; +} + +bool SBType::IsFunctionType () { if (!IsValid()) |