diff options
author | Greg Clayton <gclayton@apple.com> | 2015-08-24 23:46:31 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2015-08-24 23:46:31 +0000 |
commit | 99558cc424fee346a4070b42ac9c62546d499333 (patch) | |
tree | 3057c0119872e7d5ab68b4571f99ea64eaad1378 /lldb/source/Core/Module.cpp | |
parent | 774b5e296ff49ef15809182440715959f8db674b (diff) | |
download | bcm5719-llvm-99558cc424fee346a4070b42ac9c62546d499333.tar.gz bcm5719-llvm-99558cc424fee346a4070b42ac9c62546d499333.zip |
Final bit of type system cleanup that abstracts declaration contexts into lldb_private::CompilerDeclContext and renames ClangType to CompilerType in many accessors and functions.
Create a new "lldb_private::CompilerDeclContext" class that will replace all direct uses of "clang::DeclContext" when used in compiler agnostic code, yet still allow for conversion to clang::DeclContext subclasses by clang specific code. This completes the abstraction of type parsing by removing all "clang::" references from the SymbolFileDWARF. The new "lldb_private::CompilerDeclContext" class abstracts decl contexts found in compiler type systems so they can be used in internal API calls. The TypeSystem is required to support CompilerDeclContexts with new pure virtual functions that start with "DeclContext" in the member function names. Converted all code that used lldb_private::ClangNamespaceDecl over to use the new CompilerDeclContext class and removed the ClangNamespaceDecl.cpp and ClangNamespaceDecl.h files.
Removed direct use of clang APIs from SBType and now use the abstract type systems to correctly explore types.
Bulk renames for things that used to return a ClangASTType which is now CompilerType:
"Type::GetClangFullType()" to "Type::GetFullCompilerType()"
"Type::GetClangLayoutType()" to "Type::GetLayoutCompilerType()"
"Type::GetClangForwardType()" to "Type::GetForwardCompilerType()"
"Value::GetClangType()" to "Value::GetCompilerType()"
"Value::SetClangType (const CompilerType &)" to "Value::SetCompilerType (const CompilerType &)"
"ValueObject::GetClangType ()" to "ValueObject::GetCompilerType()"
many more renames that are similar.
llvm-svn: 245905
Diffstat (limited to 'lldb/source/Core/Module.cpp')
-rw-r--r-- | lldb/source/Core/Module.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index fff9970a649..23d426dbd3b 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -723,14 +723,14 @@ Module::ResolveSymbolContextsForFileSpec (const FileSpec &file_spec, uint32_t li size_t Module::FindGlobalVariables (const ConstString &name, - const ClangNamespaceDecl *namespace_decl, + const CompilerDeclContext *parent_decl_ctx, bool append, size_t max_matches, VariableList& variables) { SymbolVendor *symbols = GetSymbolVendor (); if (symbols) - return symbols->FindGlobalVariables(name, namespace_decl, append, max_matches, variables); + return symbols->FindGlobalVariables(name, parent_decl_ctx, append, max_matches, variables); return 0; } @@ -773,7 +773,7 @@ Module::FindCompileUnits (const FileSpec &path, size_t Module::FindFunctions (const ConstString &name, - const ClangNamespaceDecl *namespace_decl, + const CompilerDeclContext *parent_decl_ctx, uint32_t name_type_mask, bool include_symbols, bool include_inlines, @@ -803,7 +803,7 @@ Module::FindFunctions (const ConstString &name, if (symbols) { symbols->FindFunctions(lookup_name, - namespace_decl, + parent_decl_ctx, lookup_name_type_mask, include_inlines, append, @@ -843,7 +843,7 @@ Module::FindFunctions (const ConstString &name, { if (symbols) { - symbols->FindFunctions(name, namespace_decl, name_type_mask, include_inlines, append, sc_list); + symbols->FindFunctions(name, parent_decl_ctx, name_type_mask, include_inlines, append, sc_list); // Now check our symbol table for symbols that are code symbols if requested if (include_symbols) @@ -961,7 +961,7 @@ Module::FindAddressesForLine (const lldb::TargetSP target_sp, size_t Module::FindTypes_Impl (const SymbolContext& sc, const ConstString &name, - const ClangNamespaceDecl *namespace_decl, + const CompilerDeclContext *parent_decl_ctx, bool append, size_t max_matches, TypeList& types) @@ -971,7 +971,7 @@ Module::FindTypes_Impl (const SymbolContext& sc, { SymbolVendor *symbols = GetSymbolVendor (); if (symbols) - return symbols->FindTypes(sc, name, namespace_decl, append, max_matches, types); + return symbols->FindTypes(sc, name, parent_decl_ctx, append, max_matches, types); } return 0; } @@ -979,12 +979,12 @@ Module::FindTypes_Impl (const SymbolContext& sc, size_t Module::FindTypesInNamespace (const SymbolContext& sc, const ConstString &type_name, - const ClangNamespaceDecl *namespace_decl, + const CompilerDeclContext *parent_decl_ctx, size_t max_matches, TypeList& type_list) { const bool append = true; - return FindTypes_Impl(sc, type_name, namespace_decl, append, max_matches, type_list); + return FindTypes_Impl(sc, type_name, parent_decl_ctx, append, max_matches, type_list); } lldb::TypeSP |