summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2015-08-11 22:53:00 +0000
committerGreg Clayton <gclayton@apple.com>2015-08-11 22:53:00 +0000
commita1e5dc86a6306b91caf1bd4c5ed7ca1113405111 (patch)
tree6104ff1effe325c412ba70449db68df49298a32a /lldb/source/Plugins/SymbolFile
parentc49e4fe9ccff7587a271d5c17ecad130d2dea201 (diff)
downloadbcm5719-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/Plugins/SymbolFile')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp62
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h10
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp6
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h2
-rw-r--r--lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp2
-rw-r--r--lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h2
6 files changed, 42 insertions, 42 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index c8a598dd2b3..c3351d4adea 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -553,11 +553,11 @@ SymbolFileDWARF::GetTypes (SymbolContextScope *sc_scope,
// });
// }
- std::set<ClangASTType> clang_type_set;
+ std::set<CompilerType> clang_type_set;
size_t num_types_added = 0;
for (Type *type : type_set)
{
- ClangASTType clang_type = type->GetClangForwardType();
+ CompilerType clang_type = type->GetClangForwardType();
if (clang_type_set.find(clang_type) == clang_type_set.end())
{
clang_type_set.insert(clang_type);
@@ -1221,7 +1221,7 @@ SymbolFileDWARF::ParseCompileUnitFunction (const SymbolContext& sc, DWARFCompile
bool is_static = false;
bool is_variadic = false;
unsigned type_quals = 0;
- std::vector<ClangASTType> param_types;
+ std::vector<CompilerType> param_types;
std::vector<clang::ParmVarDecl*> param_decls;
const DWARFDebugInfoEntry *decl_ctx_die = NULL;
DWARFDeclContext decl_ctx;
@@ -1648,7 +1648,7 @@ SymbolFileDWARF::ParseTemplateDIE (DWARFCompileUnit* dwarf_cu,
attributes);
const char *name = NULL;
Type *lldb_type = NULL;
- ClangASTType clang_type;
+ CompilerType clang_type;
uint64_t uval64 = 0;
bool uval64_valid = false;
if (num_attributes > 0)
@@ -1788,9 +1788,9 @@ class SymbolFileDWARF::DelayedAddObjCClassProperty
public:
DelayedAddObjCClassProperty
(
- const ClangASTType &class_opaque_type,
+ const CompilerType &class_opaque_type,
const char *property_name,
- const ClangASTType &property_opaque_type, // The property type is only required if you don't have an ivar decl
+ const CompilerType &property_opaque_type, // The property type is only required if you don't have an ivar decl
clang::ObjCIvarDecl *ivar_decl,
const char *property_setter_name,
const char *property_getter_name,
@@ -1850,9 +1850,9 @@ public:
m_metadata_ap.get());
}
private:
- ClangASTType m_class_opaque_type;
+ CompilerType m_class_opaque_type;
const char *m_property_name;
- ClangASTType m_property_opaque_type;
+ CompilerType m_property_opaque_type;
clang::ObjCIvarDecl *m_ivar_decl;
const char *m_property_setter_name;
const char *m_property_getter_name;
@@ -1921,7 +1921,7 @@ SymbolFileDWARF::ParseChildMembers
const SymbolContext& sc,
DWARFCompileUnit* dwarf_cu,
const DWARFDebugInfoEntry *parent_die,
- ClangASTType &class_clang_type,
+ CompilerType &class_clang_type,
const LanguageType class_language,
std::vector<clang::CXXBaseSpecifier *>& base_classes,
std::vector<int>& member_accessibilities,
@@ -2268,14 +2268,14 @@ SymbolFileDWARF::ParseChildMembers
last_field_info.Clear();
}
- ClangASTType member_clang_type = member_type->GetClangLayoutType();
+ CompilerType member_clang_type = member_type->GetClangLayoutType();
{
// Older versions of clang emit array[0] and array[1] in the same way (<rdar://problem/12566646>).
// If the current field is at the end of the structure, then there is definitely no room for extra
// elements and we override the type to array[0].
- ClangASTType member_array_element_type;
+ CompilerType member_array_element_type;
uint64_t member_array_size;
bool member_array_is_incomplete;
@@ -2454,7 +2454,7 @@ SymbolFileDWARF::ParseChildMembers
break;
}
- ClangASTType base_class_clang_type = base_class_type->GetClangFullType();
+ CompilerType base_class_clang_type = base_class_type->GetClangFullType();
assert (base_class_clang_type);
if (class_language == eLanguageTypeObjC)
{
@@ -2599,19 +2599,19 @@ SymbolFileDWARF::ResolveTypeUID (DWARFCompileUnit* cu, const DWARFDebugInfoEntry
// SymbolFileDWARF objects to detect if this DWARF file is the one that
// can resolve a clang_type.
bool
-SymbolFileDWARF::HasForwardDeclForClangType (const ClangASTType &clang_type)
+SymbolFileDWARF::HasForwardDeclForClangType (const CompilerType &clang_type)
{
- ClangASTType clang_type_no_qualifiers = ClangASTContext::RemoveFastQualifiers(clang_type);
+ CompilerType clang_type_no_qualifiers = ClangASTContext::RemoveFastQualifiers(clang_type);
const DWARFDebugInfoEntry* die = m_forward_decl_clang_type_to_die.lookup (clang_type_no_qualifiers.GetOpaqueQualType());
return die != NULL;
}
bool
-SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (ClangASTType &clang_type)
+SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (CompilerType &clang_type)
{
// We have a struct/union/class/enum that needs to be fully resolved.
- ClangASTType clang_type_no_qualifiers = ClangASTContext::RemoveFastQualifiers(clang_type);
+ CompilerType clang_type_no_qualifiers = ClangASTContext::RemoveFastQualifiers(clang_type);
const DWARFDebugInfoEntry* die = m_forward_decl_clang_type_to_die.lookup (clang_type_no_qualifiers.GetOpaqueQualType());
if (die == NULL)
{
@@ -2810,7 +2810,7 @@ SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (ClangASTType &clang_type)
clang::TypeSourceInfo *type_source_info = base_class->getTypeSourceInfo();
if (type_source_info)
{
- ClangASTType base_class_type (GetClangASTContext().getASTContext(), type_source_info->getType());
+ CompilerType base_class_type (GetClangASTContext().getASTContext(), type_source_info->getType());
if (base_class_type.GetCompleteType() == false)
{
if (!base_class_error)
@@ -4566,7 +4566,7 @@ SymbolFileDWARF::ParseChildParameters (const SymbolContext& sc,
bool skip_artificial,
bool &is_static,
bool &is_variadic,
- std::vector<ClangASTType>& function_param_types,
+ std::vector<CompilerType>& function_param_types,
std::vector<clang::ParmVarDecl*>& function_param_decls,
unsigned &type_quals) // ,
// ClangASTContext::TemplateParameterInfos &template_param_infos))
@@ -4740,7 +4740,7 @@ size_t
SymbolFileDWARF::ParseChildEnumerators
(
const SymbolContext& sc,
- lldb_private::ClangASTType &clang_type,
+ lldb_private::CompilerType &clang_type,
bool is_signed,
uint32_t enumerator_byte_size,
DWARFCompileUnit* dwarf_cu,
@@ -5941,7 +5941,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
Declaration decl;
Type::EncodingDataType encoding_data_type = Type::eEncodingIsUID;
- ClangASTType clang_type;
+ CompilerType clang_type;
DWARFFormValue form_value;
dw_attr_t attr;
@@ -6590,7 +6590,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
DEBUG_PRINTF ("0x%8.8" PRIx64 ": %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr);
- ClangASTType enumerator_clang_type;
+ CompilerType enumerator_clang_type;
clang_type.SetClangType (&ast, m_forward_decl_die_to_clang_type.lookup (die));
if (!clang_type)
{
@@ -6759,7 +6759,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
DEBUG_PRINTF ("0x%8.8" PRIx64 ": %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr);
- ClangASTType return_clang_type;
+ CompilerType return_clang_type;
Type *func_type = NULL;
if (type_die_offset != DW_INVALID_OFFSET)
@@ -6771,7 +6771,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
return_clang_type = ast.GetBasicType(eBasicTypeVoid);
- std::vector<ClangASTType> function_param_types;
+ std::vector<CompilerType> function_param_types;
std::vector<clang::ParmVarDecl*> function_param_decls;
// Parse the function children for the parameters
@@ -6818,7 +6818,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
ObjCLanguageRuntime::MethodName objc_method (type_name_cstr, true);
if (objc_method.IsValid(true))
{
- ClangASTType class_opaque_type;
+ CompilerType class_opaque_type;
ConstString class_name(objc_method.GetClassName());
if (class_name)
{
@@ -6826,7 +6826,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
if (complete_objc_class_type_sp)
{
- ClangASTType type_clang_forward_type = complete_objc_class_type_sp->GetClangForwardType();
+ CompilerType type_clang_forward_type = complete_objc_class_type_sp->GetClangForwardType();
if (ClangASTContext::IsObjCObjectOrInterfaceType(type_clang_forward_type))
class_opaque_type = type_clang_forward_type;
}
@@ -6962,7 +6962,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
}
else
{
- ClangASTType class_opaque_type = class_type->GetClangForwardType();
+ CompilerType class_opaque_type = class_type->GetClangForwardType();
if (ClangASTContext::IsCXXClassType(class_opaque_type))
{
if (class_opaque_type.IsBeingDefined ())
@@ -7183,7 +7183,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
ParseChildArrayInfo(sc, dwarf_cu, die, first_index, element_orders, byte_stride, bit_stride);
if (byte_stride == 0 && bit_stride == 0)
byte_stride = element_type->GetByteSize();
- ClangASTType array_element_type = element_type->GetClangForwardType();
+ CompilerType array_element_type = element_type->GetClangForwardType();
uint64_t array_element_bit_stride = byte_stride * 8 + bit_stride;
if (element_orders.size() > 0)
{
@@ -7250,8 +7250,8 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
Type *pointee_type = ResolveTypeUID(type_die_offset);
Type *class_type = ResolveTypeUID(containing_type_die_offset);
- ClangASTType pointee_clang_type = pointee_type->GetClangForwardType();
- ClangASTType class_clang_type = class_type->GetClangLayoutType();
+ CompilerType pointee_clang_type = pointee_type->GetClangForwardType();
+ CompilerType class_clang_type = class_type->GetClangLayoutType();
clang_type = ClangASTContext::CreateMemberPointerType(pointee_clang_type, class_clang_type);
@@ -8087,7 +8087,7 @@ void
SymbolFileDWARF::CompleteTagDecl (void *baton, clang::TagDecl *decl)
{
SymbolFileDWARF *symbol_file_dwarf = (SymbolFileDWARF *)baton;
- ClangASTType clang_type = symbol_file_dwarf->GetClangASTContext().GetTypeForDecl (decl);
+ CompilerType clang_type = symbol_file_dwarf->GetClangASTContext().GetTypeForDecl (decl);
if (clang_type)
symbol_file_dwarf->ResolveClangOpaqueTypeDefinition (clang_type);
}
@@ -8096,7 +8096,7 @@ void
SymbolFileDWARF::CompleteObjCInterfaceDecl (void *baton, clang::ObjCInterfaceDecl *decl)
{
SymbolFileDWARF *symbol_file_dwarf = (SymbolFileDWARF *)baton;
- ClangASTType clang_type = symbol_file_dwarf->GetClangASTContext().GetTypeForDecl (decl);
+ CompilerType clang_type = symbol_file_dwarf->GetClangASTContext().GetTypeForDecl (decl);
if (clang_type)
symbol_file_dwarf->ResolveClangOpaqueTypeDefinition (clang_type);
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
index 1c840225be6..506df1cc1c5 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -112,7 +112,7 @@ public:
virtual size_t ParseVariablesForContext (const lldb_private::SymbolContext& sc);
virtual lldb_private::Type* ResolveTypeUID(lldb::user_id_t type_uid);
- virtual bool ResolveClangOpaqueTypeDefinition (lldb_private::ClangASTType& clang_type);
+ virtual bool ResolveClangOpaqueTypeDefinition (lldb_private::CompilerType& clang_type);
virtual lldb_private::Type* ResolveType (DWARFCompileUnit* dwarf_cu, const DWARFDebugInfoEntry* type_die, bool assert_not_being_parsed = true);
virtual clang::DeclContext* GetClangDeclContextContainingTypeUID (lldb::user_id_t type_uid);
@@ -273,7 +273,7 @@ public:
}
bool
- HasForwardDeclForClangType (const lldb_private::ClangASTType &clang_type);
+ HasForwardDeclForClangType (const lldb_private::CompilerType &clang_type);
protected:
@@ -345,7 +345,7 @@ protected:
const lldb_private::SymbolContext& sc,
DWARFCompileUnit* dwarf_cu,
const DWARFDebugInfoEntry *die,
- lldb_private::ClangASTType &class_clang_type,
+ lldb_private::CompilerType &class_clang_type,
const lldb::LanguageType class_language,
std::vector<clang::CXXBaseSpecifier *>& base_classes,
std::vector<int>& member_accessibilities,
@@ -363,7 +363,7 @@ protected:
bool skip_artificial,
bool &is_static,
bool &is_variadic,
- std::vector<lldb_private::ClangASTType>& function_args,
+ std::vector<lldb_private::CompilerType>& function_args,
std::vector<clang::ParmVarDecl*>& function_param_decls,
unsigned &type_quals);
// lldb_private::ClangASTContext::TemplateParameterInfos &template_param_infos); // not currently needed
@@ -371,7 +371,7 @@ protected:
size_t ParseChildEnumerators(
const lldb_private::SymbolContext& sc,
- lldb_private::ClangASTType &clang_type,
+ lldb_private::CompilerType &clang_type,
bool is_signed,
uint32_t enumerator_byte_size,
DWARFCompileUnit* dwarf_cu,
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
index 1e973b0ac68..dec3bf8a412 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -788,7 +788,7 @@ SymbolFileDWARFDebugMap::ResolveTypeUID(lldb::user_id_t type_uid)
}
bool
-SymbolFileDWARFDebugMap::ResolveClangOpaqueTypeDefinition (ClangASTType& clang_type)
+SymbolFileDWARFDebugMap::ResolveClangOpaqueTypeDefinition (CompilerType& clang_type)
{
// We have a struct/union/class/enum that needs to be fully resolved.
return false;
@@ -1433,7 +1433,7 @@ void
SymbolFileDWARFDebugMap::CompleteTagDecl (void *baton, clang::TagDecl *decl)
{
SymbolFileDWARFDebugMap *symbol_file_dwarf = (SymbolFileDWARFDebugMap *)baton;
- ClangASTType clang_type = symbol_file_dwarf->GetClangASTContext().GetTypeForDecl (decl);
+ CompilerType clang_type = symbol_file_dwarf->GetClangASTContext().GetTypeForDecl (decl);
if (clang_type)
{
symbol_file_dwarf->ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool {
@@ -1451,7 +1451,7 @@ void
SymbolFileDWARFDebugMap::CompleteObjCInterfaceDecl (void *baton, clang::ObjCInterfaceDecl *decl)
{
SymbolFileDWARFDebugMap *symbol_file_dwarf = (SymbolFileDWARFDebugMap *)baton;
- ClangASTType clang_type = symbol_file_dwarf->GetClangASTContext().GetTypeForDecl (decl);
+ CompilerType clang_type = symbol_file_dwarf->GetClangASTContext().GetTypeForDecl (decl);
if (clang_type)
{
symbol_file_dwarf->ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool {
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
index ce0cfd744f0..6843a4073ab 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
@@ -78,7 +78,7 @@ public:
lldb_private::Type* ResolveTypeUID (lldb::user_id_t type_uid) override;
clang::DeclContext* GetClangDeclContextContainingTypeUID (lldb::user_id_t type_uid) override;
clang::DeclContext* GetClangDeclContextForTypeUID (const lldb_private::SymbolContext &sc, lldb::user_id_t type_uid) override;
- bool ResolveClangOpaqueTypeDefinition (lldb_private::ClangASTType& clang_type) override;
+ bool ResolveClangOpaqueTypeDefinition (lldb_private::CompilerType& clang_type) override;
uint32_t ResolveSymbolContext (const lldb_private::Address& so_addr, uint32_t resolve_scope, lldb_private::SymbolContext& sc) override;
uint32_t ResolveSymbolContext (const lldb_private::FileSpec& file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, lldb_private::SymbolContextList& sc_list) override;
uint32_t FindGlobalVariables (const lldb_private::ConstString &name, const lldb_private::ClangNamespaceDecl *namespace_decl, bool append, uint32_t max_matches, lldb_private::VariableList& variables) override;
diff --git a/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp b/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
index c861d62b03f..4f0764a93cd 100644
--- a/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
+++ b/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
@@ -300,7 +300,7 @@ SymbolFileSymtab::ResolveTypeUID(lldb::user_id_t type_uid)
}
bool
-SymbolFileSymtab::ResolveClangOpaqueTypeDefinition (lldb_private::ClangASTType& clang_opaque_type)
+SymbolFileSymtab::ResolveClangOpaqueTypeDefinition (lldb_private::CompilerType& clang_opaque_type)
{
return false;
}
diff --git a/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h b/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
index d606419a0d9..8a12bf608f7 100644
--- a/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
+++ b/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
@@ -82,7 +82,7 @@ public:
ResolveTypeUID(lldb::user_id_t type_uid);
virtual bool
- ResolveClangOpaqueTypeDefinition (lldb_private::ClangASTType& clang_type);
+ ResolveClangOpaqueTypeDefinition (lldb_private::CompilerType& clang_type);
virtual uint32_t
ResolveSymbolContext (const lldb_private::Address& so_addr, uint32_t resolve_scope, lldb_private::SymbolContext& sc);
OpenPOWER on IntegriCloud