LLDB mainline
|
Provider for named objects defined in the debug info for Clang. More...
#include "lldb/Expression/ClangASTSource.h"
Classes | |
class | ClangASTSourceProxy |
"lldb/Expression/ClangASTSource.h" Proxy for ClangASTSource More... | |
Public Member Functions | |
ClangASTSource (const lldb::TargetSP &target, const std::shared_ptr< ClangASTImporter > &importer) | |
Constructor. | |
~ClangASTSource () override | |
Destructor. | |
clang::Decl * | GetExternalDecl (clang::GlobalDeclID) override |
Interface stubs. | |
clang::Stmt * | GetExternalDeclStmt (uint64_t) override |
clang::Selector | GetExternalSelector (uint32_t) override |
uint32_t | GetNumExternalSelectors () override |
clang::CXXBaseSpecifier * | GetExternalCXXBaseSpecifiers (uint64_t Offset) override |
void | MaterializeVisibleDecls (const clang::DeclContext *DC) |
void | InstallASTContext (TypeSystemClang &ast_context) |
bool | FindExternalVisibleDeclsByName (const clang::DeclContext *DC, clang::DeclarationName Name, const clang::DeclContext *OriginalDC) override |
Look up all Decls that match a particular name. | |
void | FindExternalLexicalDecls (const clang::DeclContext *DC, llvm::function_ref< bool(clang::Decl::Kind)> IsKindWeWant, llvm::SmallVectorImpl< clang::Decl * > &Decls) override |
Enumerate all Decls in a given lexical context. | |
bool | layoutRecordType (const clang::RecordDecl *Record, uint64_t &Size, uint64_t &Alignment, llvm::DenseMap< const clang::FieldDecl *, uint64_t > &FieldOffsets, llvm::DenseMap< const clang::CXXRecordDecl *, clang::CharUnits > &BaseOffsets, llvm::DenseMap< const clang::CXXRecordDecl *, clang::CharUnits > &VirtualBaseOffsets) override |
Specify the layout of the contents of a RecordDecl. | |
void | CompleteType (clang::TagDecl *Tag) override |
Complete a TagDecl. | |
void | CompleteType (clang::ObjCInterfaceDecl *Class) override |
Complete an ObjCInterfaceDecl. | |
void | StartTranslationUnit (clang::ASTConsumer *Consumer) override |
Called on entering a translation unit. | |
void | CompleteNamespaceMap (ClangASTImporter::NamespaceMapSP &namespace_map, ConstString name, ClangASTImporter::NamespaceMapSP &parent_map) const override |
Look up the modules containing a given namespace and put the appropriate entries in the namespace map. | |
clang::NamespaceDecl * | AddNamespace (NameSearchContext &context, ClangASTImporter::NamespaceMapSP &namespace_decls) |
virtual void | FindExternalVisibleDecls (NameSearchContext &context) |
The worker function for FindExternalVisibleDeclsByName. | |
clang::Sema * | getSema () |
void | SetLookupsEnabled (bool lookups_enabled) |
bool | GetLookupsEnabled () |
clang::ExternalASTSource * | CreateProxy () |
bool | IgnoreName (const ConstString name, bool ignore_all_dollar_names) |
Returns true if a name should be ignored by name lookup. | |
clang::Decl * | CopyDecl (clang::Decl *src_decl) |
Copies a single Decl into the parser's AST context. | |
ClangASTImporter::DeclOrigin | GetDeclOrigin (const clang::Decl *decl) |
Determined the origin of a single Decl, if it can be found. | |
TypeSystemClang * | GetTypeSystem () const |
Returns the TypeSystem that uses this ClangASTSource instance as it's ExternalASTSource. | |
![]() | |
virtual | ~MapCompleter () |
virtual void | CompleteNamespaceMap (NamespaceMapSP &namespace_map, ConstString name, NamespaceMapSP &parent_map) const =0 |
Protected Member Functions | |
clang::ObjCInterfaceDecl * | GetCompleteObjCInterface (const clang::ObjCInterfaceDecl *interface_decl) |
Look for the complete version of an Objective-C interface, and return it if found. | |
void | FindExternalVisibleDecls (NameSearchContext &context, lldb::ModuleSP module, CompilerDeclContext &namespace_decl) |
Find all entities matching a given name in a given module, using a NameSearchContext to make Decls for them. | |
void | FindObjCMethodDecls (NameSearchContext &context) |
Find all Objective-C methods matching a given selector. | |
void | FindObjCPropertyAndIvarDecls (NameSearchContext &context) |
Find all Objective-C properties and ivars with a given name. | |
void | LookupInNamespace (NameSearchContext &context) |
Performs lookup into a namespace. | |
CompilerType | GuardedCopyType (const CompilerType &src_type) |
A wrapper for TypeSystemClang::CopyType that sets a flag that indicates that we should not respond to queries during import. | |
std::shared_ptr< ClangModulesDeclVendor > | GetClangModulesDeclVendor () |
bool | FindObjCMethodDeclsWithOrigin (NameSearchContext &context, clang::ObjCInterfaceDecl *original_interface_decl, const char *log_info) |
void | FindDeclInModules (NameSearchContext &context, ConstString name) |
void | FindDeclInObjCRuntime (NameSearchContext &context, ConstString name) |
void | FillNamespaceMap (NameSearchContext &context, lldb::ModuleSP module_sp, const CompilerDeclContext &namespace_decl) |
Fills the namespace map of the given NameSearchContext. | |
clang::TagDecl * | FindCompleteType (const clang::TagDecl *decl) |
Protected Attributes | |
bool | m_lookups_enabled |
const lldb::TargetSP | m_target |
The target to use in finding variables and types. | |
clang::ASTContext * | m_ast_context |
The AST context requests are coming in for. | |
TypeSystemClang * | m_clang_ast_context |
The TypeSystemClang for m_ast_context. | |
clang::FileManager * | m_file_manager |
The file manager paired with the AST context. | |
std::shared_ptr< ClangASTImporter > | m_ast_importer_sp |
The target's AST importer. | |
std::set< const clang::Decl * > | m_active_lexical_decls |
std::set< const char * > | m_active_lookups |
Private Member Functions | |
bool | FindObjCPropertyAndIvarDeclsWithOrigin (NameSearchContext &context, DeclFromUser< const clang::ObjCInterfaceDecl > &origin_iface_decl) |
Friends | |
struct | NameSearchContext |
Provider for named objects defined in the debug info for Clang.
As Clang parses an expression, it may encounter names that are not defined inside the expression, including variables, functions, and types. Clang knows the name it is looking for, but nothing else. The ExternalSemaSource class provides Decls (VarDecl, FunDecl, TypeDecl) to Clang for these names, consulting the ClangExpressionDeclMap to do the actual lookups.
Definition at line 33 of file ClangASTSource.h.
ClangASTSource::ClangASTSource | ( | const lldb::TargetSP & | target, |
const std::shared_ptr< ClangASTImporter > & | importer | ||
) |
Constructor.
Initializes class variables.
[in] | target | A reference to the target containing debug information to use. |
[in] | importer | The ClangASTImporter to use. |
Definition at line 53 of file ClangASTSource.cpp.
References m_ast_importer_sp.
|
override |
Destructor.
Definition at line 69 of file ClangASTSource.cpp.
References lldb_private::ScratchTypeSystemClang::DefaultAST, lldb_private::ScratchTypeSystemClang::ForgetSource(), lldb_private::ScratchTypeSystemClang::GetForTarget(), m_ast_context, m_ast_importer_sp, and m_target.
NamespaceDecl * ClangASTSource::AddNamespace | ( | NameSearchContext & | context, |
ClangASTImporter::NamespaceMapSP & | namespace_decls | ||
) |
Definition at line 1435 of file ClangASTSource.cpp.
References CopyDecl(), lldb_private::TypeSystemClang::DeclContextGetAsNamespaceDecl(), lldb_private::TypeSystemClang::DeclContextGetTypeSystemClang(), m_ast_importer_sp, and lldb_private::NameSearchContext::m_decls.
Referenced by FindExternalVisibleDecls().
|
overridevirtual |
Look up the modules containing a given namespace and put the appropriate entries in the namespace map.
[in] | namespace_map | The map to be completed. |
[in] | name | The name of the namespace to be found. |
[in] | parent_map | The map for the namespace's parent namespace, if there is one. |
Implements lldb_private::ClangASTImporter::MapCompleter.
Definition at line 1361 of file ClangASTSource.cpp.
References lldb_private::Expressions, lldb_private::SymbolFile::FindNamespace(), lldb_private::TypeSystemClang::getDisplayName(), lldb_private::GetLog(), LLDB_LOG, m_ast_context, m_clang_ast_context, and m_target.
|
override |
Complete an ObjCInterfaceDecl.
[in] | Class | The Decl to be completed in place. |
Definition at line 292 of file ClangASTSource.cpp.
References CompleteType(), lldb_private::ClangASTImporter::DeclOrigin::decl, lldb_private::ClangUtil::DumpDecl(), lldb_private::Expressions, GetCompleteObjCInterface(), lldb_private::TypeSystemClang::getDisplayName(), lldb_private::GetLog(), LLDB_LOG, m_ast_context, m_ast_importer_sp, m_clang_ast_context, and lldb_private::ClangASTImporter::DeclOrigin::Valid().
|
override |
Complete a TagDecl.
[in] | Tag | The Decl to be completed in place. |
Referenced by lldb_private::ClangExpressionDeclMap::AddExpressionVariable(), CompleteType(), and lldb_private::ClangASTSource::ClangASTSourceProxy::CompleteType().
clang::Decl * ClangASTSource::CopyDecl | ( | clang::Decl * | src_decl | ) |
Copies a single Decl into the parser's AST context.
[in] | src_decl | The Decl to copy. |
Definition at line 1471 of file ClangASTSource.cpp.
References m_ast_context, and m_ast_importer_sp.
Referenced by AddNamespace(), lldb_private::ClangExpressionDeclMap::AddOneFunction(), FindDeclInModules(), FindDeclInObjCRuntime(), FindExternalLexicalDecls(), FindObjCMethodDecls(), FindObjCMethodDeclsWithOrigin(), lldb_private::ClangExpressionDeclMap::LookupFunction(), lldb_private::ClangExpressionDeclMap::LookupInModulesDeclVendor(), and lldb_private::ClangExpressionDeclMap::SearchPersistenDecls().
|
inline |
Definition at line 256 of file ClangASTSource.h.
Referenced by lldb_private::ClangExpressionParser::ParseInternal().
|
protected |
Fills the namespace map of the given NameSearchContext.
context | The NameSearchContext with the namespace map to fill. |
module_sp | The module to search for namespaces or a nullptr if the current target should be searched. |
namespace_decl | The DeclContext in which to search for namespaces. |
Definition at line 646 of file ClangASTSource.cpp.
References lldb_private::Expressions, lldb_private::SymbolFile::FindNamespace(), lldb_private::GetLog(), IgnoreName(), LLDB_LOG, lldb_private::NameSearchContext::m_decl_context, lldb_private::NameSearchContext::m_decl_name, lldb_private::NameSearchContext::m_namespace_map, and m_target.
Referenced by FindExternalVisibleDecls().
|
protected |
Definition at line 186 of file ClangASTSource.cpp.
References lldb_private::Expressions, lldb_private::ModuleList::FindTypes(), lldb_private::TypeSystemClang::GetCompleteDecl(), lldb_private::GetLog(), lldb_private::ClangUtil::GetQualType(), lldb_private::TypeResults::GetTypeMap(), lldb_private::ClangUtil::IsClangType(), LLDB_LOG, LLDB_LOGV, m_ast_importer_sp, m_clang_ast_context, m_target, and lldb_private::TypeMap::Types().
|
protected |
Definition at line 791 of file ClangASTSource.cpp.
References lldb_private::NameSearchContext::AddNamedDecl(), CopyDecl(), lldb_private::Expressions, GetClangModulesDeclVendor(), lldb_private::GetLog(), LLDB_LOG, and lldb_private::NameSearchContext::m_found_type.
Referenced by FindExternalVisibleDecls().
|
protected |
Definition at line 831 of file ClangASTSource.cpp.
References lldb_private::NameSearchContext::AddNamedDecl(), CopyDecl(), lldb_private::Expressions, lldb_private::ObjCLanguageRuntime::Get(), lldb_private::LanguageRuntime::GetDeclVendor(), lldb_private::GetLog(), LLDB_LOG, and m_target.
Referenced by FindExternalVisibleDecls().
|
override |
Enumerate all Decls in a given lexical context.
[in] | DC | The DeclContext being searched. |
[in] | IsKindWeWant | A callback function that returns true given the DeclKinds of desired Decls, and false otherwise. |
[in] | Decls | A vector that is filled in with matching Decls. |
Definition at line 368 of file ClangASTSource.cpp.
References CopyDecl(), lldb_private::ClangASTImporter::DeclOrigin::ctx, lldb_private::ClangASTImporter::DeclOrigin::decl, lldb_private::ClangUtil::DumpDecl(), lldb_private::Expressions, GetCompleteObjCInterface(), lldb_private::TypeSystemClang::getDisplayName(), lldb_private::GetLog(), LLDB_LOG, m_active_lexical_decls, m_ast_context, m_ast_importer_sp, m_clang_ast_context, and lldb_private::ClangASTImporter::DeclOrigin::Valid().
Referenced by lldb_private::ClangASTSource::ClangASTSourceProxy::FindExternalLexicalDecls().
|
virtual |
The worker function for FindExternalVisibleDeclsByName.
[in] | context | The NameSearchContext to use when filing results. |
Reimplemented in lldb_private::ClangExpressionDeclMap.
Definition at line 501 of file ClangASTSource.cpp.
References AddNamespace(), lldb_private::Expressions, FindExternalVisibleDecls(), FindObjCPropertyAndIvarDecls(), lldb_private::TypeSystemClang::getDisplayName(), lldb_private::GetLog(), lldb_private::Log::GetVerbose(), LLDB_LOG, LookupInNamespace(), m_ast_context, m_clang_ast_context, lldb_private::NameSearchContext::m_decl_context, lldb_private::NameSearchContext::m_decl_name, and lldb_private::NameSearchContext::m_namespace_map.
Referenced by FindExternalVisibleDecls(), lldb_private::ClangExpressionDeclMap::FindExternalVisibleDecls(), FindExternalVisibleDeclsByName(), and LookupInNamespace().
|
protected |
Find all entities matching a given name in a given module, using a NameSearchContext to make Decls for them.
[in] | context | The NameSearchContext that can construct Decls for this name. |
[in] | module | If non-NULL, the module to query. |
[in] | namespace_decl | If valid and module is non-NULL, the parent namespace. |
Definition at line 578 of file ClangASTSource.cpp.
References lldb_private::NameSearchContext::AddTypeDecl(), lldb_private::Expressions, FillNamespaceMap(), FindDeclInModules(), FindDeclInObjCRuntime(), lldb_private::TypeResults::GetFirstType(), lldb_private::GetLog(), lldb_private::ConstString::GetStringRef(), GuardedCopyType(), IgnoreName(), LLDB_LOG, m_ast_context, lldb_private::NameSearchContext::m_decl_name, lldb_private::NameSearchContext::m_found_type, and m_target.
|
override |
Look up all Decls that match a particular name.
Only handles Identifiers and DeclContexts that are either NamespaceDecls or TranslationUnitDecls. Calls SetExternalVisibleDeclsForName with the result.
The work for this function is done by void FindExternalVisibleDecls (NameSearchContext &);
[in] | DC | The DeclContext to register the found Decls in. |
[in] | Name | The name to find entries for. |
Definition at line 101 of file ClangASTSource.cpp.
References FindExternalVisibleDecls(), FindObjCMethodDecls(), lldb_private::ConstString::GetCString(), GetLookupsEnabled(), m_active_lookups, m_ast_context, m_clang_ast_context, and SetLookupsEnabled().
Referenced by lldb_private::ClangASTSource::ClangASTSourceProxy::FindExternalVisibleDeclsByName().
|
protected |
Find all Objective-C methods matching a given selector.
[in] | context | The NameSearchContext that can construct Decls for this name. Its m_decl_name contains the selector and its m_decl_context is the containing object. |
Definition at line 874 of file ClangASTSource.cpp.
References lldb_private::NameSearchContext::AddNamedDecl(), lldb_private::SymbolContextList::Append(), lldb_private::ConstString::AsCString(), lldb_private::SymbolContextList::Clear(), lldb_private::StreamString::Clear(), CopyDecl(), lldb_private::ClangASTImporter::DeclOrigin::decl, lldb_private::TypeSystemClang::DeclContextGetAsObjCMethodDecl(), lldb_private::ClangUtil::DumpDecl(), lldb_private::Expressions, FindObjCMethodDeclsWithOrigin(), lldb_private::StreamString::Flush(), lldb_private::ObjCLanguageRuntime::Get(), GetClangModulesDeclVendor(), GetCompleteObjCInterface(), lldb_private::LanguageRuntime::GetDeclVendor(), lldb_private::TypeSystemClang::getDisplayName(), lldb_private::GetLog(), lldb_private::SymbolContextList::GetSize(), lldb_private::StreamString::GetString(), lldb_private::ModuleFunctionSearchOptions::include_inlines, lldb_private::ModuleFunctionSearchOptions::include_symbols, LLDB_LOG, m_ast_context, m_ast_importer_sp, m_clang_ast_context, lldb_private::NameSearchContext::m_decl_context, lldb_private::NameSearchContext::m_decl_name, m_target, lldb_private::Stream::Printf(), and lldb_private::ClangASTImporter::DeclOrigin::Valid().
Referenced by FindExternalVisibleDeclsByName().
|
protected |
Definition at line 708 of file ClangASTSource.cpp.
References lldb_private::NameSearchContext::AddNamedDecl(), CopyDecl(), lldb_private::ClangUtil::DumpDecl(), lldb_private::Expressions, lldb_private::TypeSystemClang::GetCompleteDecl(), lldb_private::GetLog(), LLDB_LOG, and lldb_private::NameSearchContext::m_decl_name.
Referenced by FindObjCMethodDecls().
|
protected |
Find all Objective-C properties and ivars with a given name.
[in] | context | The NameSearchContext that can construct Decls for this name. Its m_decl_name contains the name and its m_decl_context is the containing object. |
Definition at line 1191 of file ClangASTSource.cpp.
References lldb_private::TaggedASTDecl< D >::decl, lldb_private::Expressions, FindObjCPropertyAndIvarDeclsWithOrigin(), lldb_private::ObjCLanguageRuntime::Get(), GetClangModulesDeclVendor(), GetCompleteObjCInterface(), lldb_private::LanguageRuntime::GetDeclVendor(), lldb_private::TypeSystemClang::getDisplayName(), lldb_private::GetLog(), lldb_private::DeclFromParser< D >::GetOrigin(), lldb_private::TaggedASTDecl< D >::IsValid(), LLDB_LOG, m_ast_context, m_ast_importer_sp, m_clang_ast_context, lldb_private::NameSearchContext::m_decl_context, lldb_private::NameSearchContext::m_decl_name, and m_target.
Referenced by FindExternalVisibleDecls().
|
private |
Definition at line 1142 of file ClangASTSource.cpp.
References lldb_private::NameSearchContext::AddNamedDecl(), lldb_private::TaggedASTDecl< D >::decl, lldb_private::ClangUtil::DumpDecl(), lldb_private::Expressions, lldb_private::GetLog(), lldb_private::DeclFromUser< D >::Import(), lldb_private::TaggedASTDecl< D >::IsInvalid(), lldb_private::TaggedASTDecl< D >::IsValid(), LLDB_LOG, m_ast_context, m_ast_importer_sp, and lldb_private::NameSearchContext::m_decl_name.
Referenced by FindObjCPropertyAndIvarDecls().
|
protected |
Definition at line 1498 of file ClangASTSource.cpp.
References lldb::eLanguageTypeC, and m_target.
Referenced by FindDeclInModules(), FindObjCMethodDecls(), FindObjCPropertyAndIvarDecls(), lldb_private::ClangExpressionDeclMap::LookupFunction(), and lldb_private::ClangExpressionDeclMap::LookupInModulesDeclVendor().
|
protected |
Look for the complete version of an Objective-C interface, and return it if found.
[in] | interface_decl | An ObjCInterfaceDecl that may not be the complete one. |
Definition at line 327 of file ClangASTSource.cpp.
References lldb_private::ObjCLanguageRuntime::Get(), lldb_private::CompilerType::GetOpaqueQualType(), lldb_private::ObjCLanguageRuntime::LookupInCompleteClassCache(), and m_target.
Referenced by CompleteType(), FindExternalLexicalDecls(), FindObjCMethodDecls(), and FindObjCPropertyAndIvarDecls().
ClangASTImporter::DeclOrigin ClangASTSource::GetDeclOrigin | ( | const clang::Decl * | decl | ) |
Determined the origin of a single Decl, if it can be found.
[in] | decl | The Decl whose origin is to be found. |
Definition at line 1475 of file ClangASTSource.cpp.
References m_ast_importer_sp.
|
inlineoverride |
Definition at line 59 of file ClangASTSource.h.
|
inlineoverride |
Interface stubs.
Definition at line 52 of file ClangASTSource.h.
|
inlineoverride |
Definition at line 53 of file ClangASTSource.h.
|
inlineoverride |
Definition at line 54 of file ClangASTSource.h.
|
inline |
Definition at line 205 of file ClangASTSource.h.
References m_lookups_enabled.
Referenced by FindExternalVisibleDeclsByName().
|
inlineoverride |
Definition at line 57 of file ClangASTSource.h.
clang::Sema * ClangASTSource::getSema | ( | ) |
Definition at line 557 of file ClangASTSource.cpp.
References lldb_private::TypeSystemClang::getSema(), and m_clang_ast_context.
|
inline |
Returns the TypeSystem that uses this ClangASTSource instance as it's ExternalASTSource.
Definition at line 356 of file ClangASTSource.h.
References m_clang_ast_context.
Referenced by IRForTarget::CreateResultVariable(), IRForTarget::MaybeHandleVariable(), and IRForTarget::RewritePersistentAlloc().
|
protected |
A wrapper for TypeSystemClang::CopyType that sets a flag that indicates that we should not respond to queries during import.
[in] | src_type | The source type. |
Definition at line 1479 of file ClangASTSource.cpp.
References lldb_private::CompilerType::TypeSystemSPWrapper::dyn_cast_or_null(), lldb_private::ClangUtil::GetQualType(), lldb_private::TypeSystemClang::GetType(), lldb_private::CompilerType::GetTypeSystem(), m_ast_importer_sp, and m_clang_ast_context.
Referenced by lldb_private::ClangExpressionDeclMap::AddContextClassType(), lldb_private::ClangExpressionDeclMap::AddOneFunction(), lldb_private::ClangExpressionDeclMap::AddOneType(), lldb_private::ClangExpressionDeclMap::AddOneVariable(), FindExternalVisibleDecls(), lldb_private::ClangExpressionDeclMap::GetVariableValue(), and lldb_private::ClangExpressionDeclMap::SearchFunctionsInSymbolContexts().
bool ClangASTSource::IgnoreName | ( | const ConstString | name, |
bool | ignore_all_dollar_names | ||
) |
Returns true if a name should be ignored by name lookup.
[in] | name | The name to be considered. |
[in] | ignore_all_dollar_names | True if $-names of all sorts should be ignored. |
Definition at line 561 of file ClangASTSource.cpp.
References lldb_private::ConstString::GetStringRef(), and m_ast_context.
Referenced by FillNamespaceMap(), FindExternalVisibleDecls(), and lldb_private::ClangExpressionDeclMap::FindExternalVisibleDecls().
void ClangASTSource::InstallASTContext | ( | TypeSystemClang & | ast_context | ) |
Definition at line 62 of file ClangASTSource.cpp.
References lldb_private::TypeSystemClang::getASTContext(), m_ast_context, m_ast_importer_sp, m_clang_ast_context, and m_file_manager.
Referenced by lldb_private::ClangExpressionParser::ParseInternal().
|
override |
Specify the layout of the contents of a RecordDecl.
[in] | Record | The record (in the parser's AST context) that needs to be laid out. |
[out] | Size | The total size of the record in bits. |
[out] | Alignment | The alignment of the record in bits. |
[in] | FieldOffsets | A map that must be populated with pairs of the record's fields (in the parser's AST context) and their offsets (measured in bits). |
[in] | BaseOffsets | A map that must be populated with pairs of the record's C++ concrete base classes (in the parser's AST context, and only if the record is a CXXRecordDecl and has base classes) and their offsets (measured in bytes). |
[in] | VirtualBaseOffsets | A map that must be populated with pairs of the record's C++ virtual base classes (in the parser's AST context, and only if the record is a CXXRecordDecl and has base classes) and their offsets (measured in bytes). |
Definition at line 1349 of file ClangASTSource.cpp.
References m_ast_importer_sp.
Referenced by lldb_private::ClangASTSource::ClangASTSourceProxy::layoutRecordType().
|
protected |
Performs lookup into a namespace.
context | The NameSearchContext for a lookup inside a namespace. |
Definition at line 1324 of file ClangASTSource.cpp.
References lldb_private::Expressions, FindExternalVisibleDecls(), lldb_private::GetLog(), LLDB_LOG, LLDB_LOGV, m_ast_importer_sp, and lldb_private::NameSearchContext::m_decl_context.
Referenced by FindExternalVisibleDecls().
|
inline |
Definition at line 62 of file ClangASTSource.h.
|
inline |
Definition at line 202 of file ClangASTSource.h.
References m_lookups_enabled.
Referenced by lldb_private::ClangUserExpression::Complete(), FindExternalVisibleDeclsByName(), and lldb_private::ClangUserExpression::TryParse().
|
override |
Called on entering a translation unit.
Tells Clang by calling setHasExternalVisibleStorage() and setHasExternalLexicalStorage() that this object has something to say about undefined names.
[in] | Consumer | Unused. |
Definition at line 92 of file ClangASTSource.cpp.
References m_ast_context.
Referenced by lldb_private::ClangASTSource::ClangASTSourceProxy::StartTranslationUnit().
|
friend |
Definition at line 382 of file ClangASTSource.h.
|
protected |
Definition at line 396 of file ClangASTSource.h.
Referenced by FindExternalLexicalDecls().
|
protected |
Definition at line 397 of file ClangASTSource.h.
Referenced by FindExternalVisibleDeclsByName().
|
protected |
The AST context requests are coming in for.
Definition at line 389 of file ClangASTSource.h.
Referenced by lldb_private::ClangExpressionDeclMap::AddContextClassType(), CompleteNamespaceMap(), CompleteType(), CopyDecl(), lldb_private::ClangExpressionDeclMap::DeportType(), FindExternalLexicalDecls(), FindExternalVisibleDecls(), lldb_private::ClangExpressionDeclMap::FindExternalVisibleDecls(), FindExternalVisibleDeclsByName(), FindObjCMethodDecls(), FindObjCPropertyAndIvarDecls(), FindObjCPropertyAndIvarDeclsWithOrigin(), lldb_private::ClangExpressionDeclMap::GetScratchContext(), IgnoreName(), InstallASTContext(), StartTranslationUnit(), and ~ClangASTSource().
|
protected |
The target's AST importer.
Definition at line 395 of file ClangASTSource.h.
Referenced by AddNamespace(), ClangASTSource(), CompleteType(), CopyDecl(), lldb_private::ClangExpressionDeclMap::DeportType(), FindCompleteType(), FindExternalLexicalDecls(), lldb_private::ClangExpressionDeclMap::FindExternalVisibleDecls(), FindObjCMethodDecls(), FindObjCPropertyAndIvarDecls(), FindObjCPropertyAndIvarDeclsWithOrigin(), GetDeclOrigin(), GuardedCopyType(), InstallASTContext(), layoutRecordType(), LookupInNamespace(), and ~ClangASTSource().
|
protected |
The TypeSystemClang for m_ast_context.
Definition at line 391 of file ClangASTSource.h.
Referenced by lldb_private::ClangExpressionDeclMap::AddContextClassType(), lldb_private::ClangExpressionDeclMap::AddOneGenericVariable(), lldb_private::ClangExpressionDeclMap::AddOneRegister(), CompleteNamespaceMap(), CompleteType(), FindCompleteType(), FindExternalLexicalDecls(), FindExternalVisibleDecls(), lldb_private::ClangExpressionDeclMap::FindExternalVisibleDecls(), FindExternalVisibleDeclsByName(), FindObjCMethodDecls(), FindObjCPropertyAndIvarDecls(), getSema(), GetTypeSystem(), GuardedCopyType(), InstallASTContext(), and lldb_private::ClangExpressionDeclMap::LookupLocalVarNamespace().
|
protected |
The file manager paired with the AST context.
Definition at line 393 of file ClangASTSource.h.
Referenced by InstallASTContext().
|
protected |
Definition at line 384 of file ClangASTSource.h.
Referenced by GetLookupsEnabled(), and SetLookupsEnabled().
|
protected |
The target to use in finding variables and types.
Definition at line 387 of file ClangASTSource.h.
Referenced by CompleteNamespaceMap(), FillNamespaceMap(), FindCompleteType(), FindDeclInObjCRuntime(), FindExternalVisibleDecls(), FindObjCMethodDecls(), FindObjCPropertyAndIvarDecls(), GetClangModulesDeclVendor(), GetCompleteObjCInterface(), lldb_private::ClangExpressionDeclMap::LookupInModulesDeclVendor(), and ~ClangASTSource().