diff options
| author | Greg Clayton <gclayton@apple.com> | 2015-08-11 22:53:00 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2015-08-11 22:53:00 +0000 |
| commit | a1e5dc86a6306b91caf1bd4c5ed7ca1113405111 (patch) | |
| tree | 6104ff1effe325c412ba70449db68df49298a32a /lldb/source/API | |
| parent | c49e4fe9ccff7587a271d5c17ecad130d2dea201 (diff) | |
| download | bcm5719-llvm-a1e5dc86a6306b91caf1bd4c5ed7ca1113405111.tar.gz bcm5719-llvm-a1e5dc86a6306b91caf1bd4c5ed7ca1113405111.zip | |
ClangASTType is now CompilerType.
This is more preparation for multiple different kinds of types from different compilers (clang, Pascal, Go, RenderScript, Swift, etc).
llvm-svn: 244689
Diffstat (limited to 'lldb/source/API')
| -rw-r--r-- | lldb/source/API/SBTarget.cpp | 10 | ||||
| -rw-r--r-- | lldb/source/API/SBType.cpp | 72 | ||||
| -rw-r--r-- | lldb/source/API/SBTypeEnumMember.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/API/SBTypeNameSpecifier.cpp | 4 | ||||
| -rw-r--r-- | lldb/source/API/SBValue.cpp | 10 |
5 files changed, 49 insertions, 49 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp index f80ed8cb8e2..9fdd4dfe8aa 100644 --- a/lldb/source/API/SBTarget.cpp +++ b/lldb/source/API/SBTarget.cpp @@ -1346,7 +1346,7 @@ SBTarget::WatchAddress (lldb::addr_t addr, size_t size, bool read, bool write, S // Target::CreateWatchpoint() is thread safe. Error cw_error; // This API doesn't take in a type, so we can't figure out what it is. - ClangASTType *type = NULL; + CompilerType *type = NULL; watchpoint_sp = target_sp->CreateWatchpoint(addr, size, type, watch_type, cw_error); error.SetError(cw_error); sb_watchpoint.SetSP (watchpoint_sp); @@ -1400,7 +1400,7 @@ SBTarget::CreateValueFromAddress (const char *name, SBAddress addr, SBType type) { lldb::addr_t load_addr(addr.GetLoadAddress(*this)); ExecutionContext exe_ctx (ExecutionContextRef(ExecutionContext(m_opaque_sp.get(),false))); - ClangASTType ast_type(type.GetSP()->GetClangASTType(true)); + CompilerType ast_type(type.GetSP()->GetCompilerType(true)); new_value_sp = ValueObject::CreateValueObjectFromAddress(name, load_addr, exe_ctx, ast_type); } sb_value.SetSP(new_value_sp); @@ -1427,7 +1427,7 @@ SBTarget::CreateValueFromData (const char *name, lldb::SBData data, lldb::SBType { DataExtractorSP extractor(*data); ExecutionContext exe_ctx (ExecutionContextRef(ExecutionContext(m_opaque_sp.get(),false))); - ClangASTType ast_type(type.GetSP()->GetClangASTType(true)); + CompilerType ast_type(type.GetSP()->GetCompilerType(true)); new_value_sp = ValueObject::CreateValueObjectFromData(name, *extractor, exe_ctx, ast_type); } sb_value.SetSP(new_value_sp); @@ -1808,7 +1808,7 @@ SBTarget::FindFirstType (const char* typename_cstr) if (objc_decl_vendor->FindDecls(const_typename, true, 1, decls) > 0) { - if (ClangASTType type = ClangASTContext::GetTypeForDecl(decls[0])) + if (CompilerType type = ClangASTContext::GetTypeForDecl(decls[0])) { return SBType(type); } @@ -1888,7 +1888,7 @@ SBTarget::FindTypes (const char* typename_cstr) { for (clang::NamedDecl *decl : decls) { - if (ClangASTType type = ClangASTContext::GetTypeForDecl(decl)) + if (CompilerType type = ClangASTContext::GetTypeForDecl(decl)) { sb_type_list.Append(SBType(type)); } diff --git a/lldb/source/API/SBType.cpp b/lldb/source/API/SBType.cpp index 4977ee60321..14cd6ff18b6 100644 --- a/lldb/source/API/SBType.cpp +++ b/lldb/source/API/SBType.cpp @@ -15,7 +15,7 @@ #include "lldb/Core/Log.h" #include "lldb/Core/Stream.h" #include "lldb/Symbol/ClangASTContext.h" -#include "lldb/Symbol/ClangASTType.h" +#include "lldb/Symbol/CompilerType.h" #include "lldb/Symbol/Type.h" #include "clang/AST/Decl.h" @@ -29,8 +29,8 @@ SBType::SBType() : { } -SBType::SBType (const ClangASTType &type) : - m_opaque_sp(new TypeImpl(ClangASTType(type.GetTypeSystem(), +SBType::SBType (const CompilerType &type) : + m_opaque_sp(new TypeImpl(CompilerType(type.GetTypeSystem(), type.GetOpaqueQualType()))) { } @@ -143,7 +143,7 @@ SBType::GetByteSize() if (!IsValid()) return 0; - return m_opaque_sp->GetClangASTType(false).GetByteSize(nullptr); + return m_opaque_sp->GetCompilerType(false).GetByteSize(nullptr); } @@ -152,7 +152,7 @@ SBType::IsPointerType() { if (!IsValid()) return false; - return m_opaque_sp->GetClangASTType(true).IsPointerType(); + return m_opaque_sp->GetCompilerType(true).IsPointerType(); } bool @@ -160,7 +160,7 @@ SBType::IsArrayType() { if (!IsValid()) return false; - return m_opaque_sp->GetClangASTType(true).IsArrayType(nullptr, nullptr, nullptr); + return m_opaque_sp->GetCompilerType(true).IsArrayType(nullptr, nullptr, nullptr); } bool @@ -168,7 +168,7 @@ SBType::IsVectorType() { if (!IsValid()) return false; - return m_opaque_sp->GetClangASTType(true).IsVectorType(nullptr, nullptr); + return m_opaque_sp->GetCompilerType(true).IsVectorType(nullptr, nullptr); } bool @@ -176,7 +176,7 @@ SBType::IsReferenceType() { if (!IsValid()) return false; - return m_opaque_sp->GetClangASTType(true).IsReferenceType(); + return m_opaque_sp->GetCompilerType(true).IsReferenceType(); } SBType @@ -225,7 +225,7 @@ SBType::GetArrayElementType() { if (!IsValid()) return SBType(); - return SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetClangASTType(true).GetArrayElementType()))); + return SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetCompilerType(true).GetArrayElementType()))); } SBType @@ -234,8 +234,8 @@ SBType::GetVectorElementType () SBType type_sb; if (IsValid()) { - ClangASTType vector_element_type; - if (m_opaque_sp->GetClangASTType(true).IsVectorType(&vector_element_type, nullptr)) + CompilerType vector_element_type; + if (m_opaque_sp->GetCompilerType(true).IsVectorType(&vector_element_type, nullptr)) type_sb.SetSP(TypeImplSP(new TypeImpl(vector_element_type))); } return type_sb; @@ -246,7 +246,7 @@ SBType::IsFunctionType () { if (!IsValid()) return false; - return m_opaque_sp->GetClangASTType(true).IsFunctionType(); + return m_opaque_sp->GetCompilerType(true).IsFunctionType(); } bool @@ -254,7 +254,7 @@ SBType::IsPolymorphicClass () { if (!IsValid()) return false; - return m_opaque_sp->GetClangASTType(true).IsPolymorphicClass(); + return m_opaque_sp->GetCompilerType(true).IsPolymorphicClass(); } bool @@ -262,7 +262,7 @@ SBType::IsTypedefType () { if (!IsValid()) return false; - return m_opaque_sp->GetClangASTType(true).IsTypedefType(); + return m_opaque_sp->GetCompilerType(true).IsTypedefType(); } lldb::SBType @@ -270,7 +270,7 @@ SBType::GetFunctionReturnType () { if (IsValid()) { - ClangASTType return_clang_type (m_opaque_sp->GetClangASTType(true).GetFunctionReturnType()); + CompilerType return_clang_type (m_opaque_sp->GetCompilerType(true).GetFunctionReturnType()); if (return_clang_type.IsValid()) return SBType(return_clang_type); } @@ -283,7 +283,7 @@ SBType::GetFunctionArgumentTypes () SBTypeList sb_type_list; if (IsValid()) { - ClangASTType func_type(m_opaque_sp->GetClangASTType(true)); + CompilerType func_type(m_opaque_sp->GetCompilerType(true)); size_t count = func_type.GetNumberOfFunctionArguments(); for (size_t i = 0; i < count; @@ -300,7 +300,7 @@ SBType::GetNumberOfMemberFunctions () { if (IsValid()) { - return m_opaque_sp->GetClangASTType(true).GetNumMemberFunctions(); + return m_opaque_sp->GetCompilerType(true).GetNumMemberFunctions(); } return 0; } @@ -310,7 +310,7 @@ SBType::GetMemberFunctionAtIndex (uint32_t idx) { SBTypeMemberFunction sb_func_type; if (IsValid()) - sb_func_type.reset(new TypeMemberFunctionImpl(m_opaque_sp->GetClangASTType(true).GetMemberFunctionAtIndex(idx))); + sb_func_type.reset(new TypeMemberFunctionImpl(m_opaque_sp->GetCompilerType(true).GetMemberFunctionAtIndex(idx))); return sb_func_type; } @@ -335,7 +335,7 @@ lldb::BasicType SBType::GetBasicType() { if (IsValid()) - return m_opaque_sp->GetClangASTType(false).GetBasicTypeEnumeration (); + return m_opaque_sp->GetCompilerType(false).GetBasicTypeEnumeration (); return eBasicTypeInvalid; } @@ -356,7 +356,7 @@ uint32_t SBType::GetNumberOfDirectBaseClasses () { if (IsValid()) - return ClangASTContext::GetNumDirectBaseClasses(m_opaque_sp->GetClangASTType(true)); + return ClangASTContext::GetNumDirectBaseClasses(m_opaque_sp->GetCompilerType(true)); return 0; } @@ -364,7 +364,7 @@ uint32_t SBType::GetNumberOfVirtualBaseClasses () { if (IsValid()) - return ClangASTContext::GetNumVirtualBaseClasses(m_opaque_sp->GetClangASTType(true)); + return ClangASTContext::GetNumVirtualBaseClasses(m_opaque_sp->GetCompilerType(true)); return 0; } @@ -372,7 +372,7 @@ uint32_t SBType::GetNumberOfFields () { if (IsValid()) - return m_opaque_sp->GetClangASTType(true).GetNumFields(); + return m_opaque_sp->GetCompilerType(true).GetNumFields(); return 0; } @@ -399,11 +399,11 @@ SBType::GetDirectBaseClassAtIndex (uint32_t idx) SBTypeMember sb_type_member; if (IsValid()) { - ClangASTType this_type (m_opaque_sp->GetClangASTType (true)); + CompilerType this_type (m_opaque_sp->GetCompilerType (true)); if (this_type.IsValid()) { uint32_t bit_offset = 0; - ClangASTType base_class_type (ClangASTContext::GetDirectBaseClassAtIndex(this_type, idx, &bit_offset)); + CompilerType base_class_type (ClangASTContext::GetDirectBaseClassAtIndex(this_type, idx, &bit_offset)); if (base_class_type.IsValid()) { sb_type_member.reset (new TypeMemberImpl (TypeImplSP(new TypeImpl(base_class_type)), bit_offset)); @@ -420,11 +420,11 @@ SBType::GetVirtualBaseClassAtIndex (uint32_t idx) SBTypeMember sb_type_member; if (IsValid()) { - ClangASTType this_type (m_opaque_sp->GetClangASTType (true)); + CompilerType this_type (m_opaque_sp->GetCompilerType (true)); if (this_type.IsValid()) { uint32_t bit_offset = 0; - ClangASTType base_class_type (ClangASTContext::GetVirtualBaseClassAtIndex(this_type, idx, &bit_offset)); + CompilerType base_class_type (ClangASTContext::GetVirtualBaseClassAtIndex(this_type, idx, &bit_offset)); if (base_class_type.IsValid()) { sb_type_member.reset (new TypeMemberImpl (TypeImplSP(new TypeImpl(base_class_type)), bit_offset)); @@ -440,14 +440,14 @@ SBType::GetEnumMembers () SBTypeEnumMemberList sb_enum_member_list; if (IsValid()) { - const clang::EnumDecl *enum_decl = ClangASTContext::GetAsEnumDecl(m_opaque_sp->GetClangASTType(true).GetFullyUnqualifiedType()); + const clang::EnumDecl *enum_decl = ClangASTContext::GetAsEnumDecl(m_opaque_sp->GetCompilerType(true).GetFullyUnqualifiedType()); if (enum_decl) { clang::EnumDecl::enumerator_iterator enum_pos, enum_end_pos; for (enum_pos = enum_decl->enumerator_begin(), enum_end_pos = enum_decl->enumerator_end(); enum_pos != enum_end_pos; ++enum_pos) { SBTypeEnumMember enum_member; - enum_member.reset(new TypeEnumMemberImpl(*enum_pos, ClangASTType(m_opaque_sp->GetTypeSystem(true), enum_decl->getIntegerType().getAsOpaquePtr()))); + enum_member.reset(new TypeEnumMemberImpl(*enum_pos, CompilerType(m_opaque_sp->GetTypeSystem(true), enum_decl->getIntegerType().getAsOpaquePtr()))); sb_enum_member_list.Append(enum_member); } } @@ -461,14 +461,14 @@ SBType::GetFieldAtIndex (uint32_t idx) SBTypeMember sb_type_member; if (IsValid()) { - ClangASTType this_type (m_opaque_sp->GetClangASTType (false)); + CompilerType this_type (m_opaque_sp->GetCompilerType (false)); if (this_type.IsValid()) { uint64_t bit_offset = 0; uint32_t bitfield_bit_size = 0; bool is_bitfield = false; std::string name_sstr; - ClangASTType field_type (this_type.GetFieldAtIndex (idx, + CompilerType field_type (this_type.GetFieldAtIndex (idx, name_sstr, &bit_offset, &bitfield_bit_size, @@ -494,7 +494,7 @@ SBType::IsTypeComplete() { if (!IsValid()) return false; - return m_opaque_sp->GetClangASTType(false).IsCompleteType(); + return m_opaque_sp->GetCompilerType(false).IsCompleteType(); } uint32_t @@ -502,7 +502,7 @@ SBType::GetTypeFlags () { if (!IsValid()) return 0; - return m_opaque_sp->GetClangASTType(true).GetTypeInfo(); + return m_opaque_sp->GetCompilerType(true).GetTypeInfo(); } const char* @@ -525,7 +525,7 @@ lldb::TypeClass SBType::GetTypeClass () { if (IsValid()) - return m_opaque_sp->GetClangASTType(true).GetTypeClass(); + return m_opaque_sp->GetCompilerType(true).GetTypeClass(); return lldb::eTypeClassInvalid; } @@ -533,7 +533,7 @@ uint32_t SBType::GetNumberOfTemplateArguments () { if (IsValid()) - return ClangASTContext::GetNumTemplateArguments(m_opaque_sp->GetClangASTType(false)); + return ClangASTContext::GetNumTemplateArguments(m_opaque_sp->GetCompilerType(false)); return 0; } @@ -543,7 +543,7 @@ SBType::GetTemplateArgumentType (uint32_t idx) if (IsValid()) { TemplateArgumentKind kind = eTemplateArgumentKindNull; - ClangASTType template_arg_type = ClangASTContext::GetTemplateArgument(m_opaque_sp->GetClangASTType(false), idx, kind); + CompilerType template_arg_type = ClangASTContext::GetTemplateArgument(m_opaque_sp->GetCompilerType(false), idx, kind); if (template_arg_type.IsValid()) return SBType(template_arg_type); } @@ -556,7 +556,7 @@ SBType::GetTemplateArgumentKind (uint32_t idx) { TemplateArgumentKind kind = eTemplateArgumentKindNull; if (IsValid()) - ClangASTContext::GetTemplateArgument(m_opaque_sp->GetClangASTType(false), idx, kind); + ClangASTContext::GetTemplateArgument(m_opaque_sp->GetCompilerType(false), idx, kind); return kind; } diff --git a/lldb/source/API/SBTypeEnumMember.cpp b/lldb/source/API/SBTypeEnumMember.cpp index 47c57dd213f..d9598b71308 100644 --- a/lldb/source/API/SBTypeEnumMember.cpp +++ b/lldb/source/API/SBTypeEnumMember.cpp @@ -12,7 +12,7 @@ #include "lldb/API/SBTypeEnumMember.h" #include "lldb/API/SBStream.h" #include "lldb/Core/Stream.h" -#include "lldb/Symbol/ClangASTType.h" +#include "lldb/Symbol/CompilerType.h" #include "lldb/Symbol/Type.h" using namespace lldb; diff --git a/lldb/source/API/SBTypeNameSpecifier.cpp b/lldb/source/API/SBTypeNameSpecifier.cpp index c58747170b5..6f6801099b7 100644 --- a/lldb/source/API/SBTypeNameSpecifier.cpp +++ b/lldb/source/API/SBTypeNameSpecifier.cpp @@ -34,7 +34,7 @@ SBTypeNameSpecifier::SBTypeNameSpecifier (SBType type) : m_opaque_sp() { if (type.IsValid()) - m_opaque_sp = TypeNameSpecifierImplSP(new TypeNameSpecifierImpl(type.m_opaque_sp->GetClangASTType(true))); + m_opaque_sp = TypeNameSpecifierImplSP(new TypeNameSpecifierImpl(type.m_opaque_sp->GetCompilerType(true))); } SBTypeNameSpecifier::SBTypeNameSpecifier (const lldb::SBTypeNameSpecifier &rhs) : @@ -65,7 +65,7 @@ SBTypeNameSpecifier::GetType () { if (!IsValid()) return SBType(); - lldb_private::ClangASTType c_type = m_opaque_sp->GetClangASTType(); + lldb_private::CompilerType c_type = m_opaque_sp->GetCompilerType(); if (c_type.IsValid()) return SBType(c_type); return SBType(); diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp index 9b720bdde19..cd5ba677598 100644 --- a/lldb/source/API/SBValue.cpp +++ b/lldb/source/API/SBValue.cpp @@ -831,7 +831,7 @@ SBValue::CreateChildAtOffset (const char *name, uint32_t offset, SBType type) TypeImplSP type_sp (type.GetSP()); if (type.IsValid()) { - sb_value.SetSP(value_sp->GetSyntheticChildAtOffset(offset, type_sp->GetClangASTType(false), true),GetPreferDynamicValue(),GetPreferSyntheticValue(), name); + sb_value.SetSP(value_sp->GetSyntheticChildAtOffset(offset, type_sp->GetCompilerType(false), true),GetPreferDynamicValue(),GetPreferSyntheticValue(), name); } } Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); @@ -856,7 +856,7 @@ SBValue::Cast (SBType type) lldb::ValueObjectSP value_sp(GetSP(locker)); TypeImplSP type_sp (type.GetSP()); if (value_sp && type_sp) - sb_value.SetSP(value_sp->Cast(type_sp->GetClangASTType(false)),GetPreferDynamicValue(),GetPreferSyntheticValue()); + sb_value.SetSP(value_sp->Cast(type_sp->GetCompilerType(false)),GetPreferDynamicValue(),GetPreferSyntheticValue()); return sb_value; } @@ -907,7 +907,7 @@ SBValue::CreateValueFromAddress(const char* name, lldb::addr_t address, SBType s lldb::TypeImplSP type_impl_sp (sb_type.GetSP()); if (value_sp && type_impl_sp) { - ClangASTType ast_type(type_impl_sp->GetClangASTType(true)); + CompilerType ast_type(type_impl_sp->GetCompilerType(true)); ExecutionContext exe_ctx (value_sp->GetExecutionContextRef()); new_value_sp = ValueObject::CreateValueObjectFromAddress(name, address, exe_ctx, ast_type); } @@ -936,7 +936,7 @@ SBValue::CreateValueFromData (const char* name, SBData data, SBType type) if (value_sp) { ExecutionContext exe_ctx (value_sp->GetExecutionContextRef()); - new_value_sp = ValueObject::CreateValueObjectFromData(name, **data, exe_ctx, type.GetSP()->GetClangASTType(true)); + new_value_sp = ValueObject::CreateValueObjectFromData(name, **data, exe_ctx, type.GetSP()->GetCompilerType(true)); new_value_sp->SetAddressTypeOfChildren(eAddressTypeLoad); } sb_value.SetSP(new_value_sp); @@ -1812,7 +1812,7 @@ SBValue::Watch (bool resolve_location, bool read, bool write, SBError &error) watch_type |= LLDB_WATCH_TYPE_WRITE; Error rc; - ClangASTType type (value_sp->GetClangType()); + CompilerType type (value_sp->GetClangType()); WatchpointSP watchpoint_sp = target_sp->CreateWatchpoint(addr, byte_size, &type, watch_type, rc); error.SetError(rc); |

