9#ifndef LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGASTSOURCE_H
10#define LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGASTSOURCE_H
18#include "clang/AST/ExternalASTSource.h"
19#include "clang/Basic/IdentifierTable.h"
21#include "llvm/ADT/SmallSet.h"
46 const std::shared_ptr<ClangASTImporter> &importer);
55 return clang::Selector();
58 clang::CXXBaseSpecifier *
87 clang::DeclarationName Name)
override;
101 const clang::DeclContext *DC,
102 llvm::function_ref<
bool(clang::Decl::Kind)> IsKindWeWant,
137 const clang::RecordDecl *Record, uint64_t &Size, uint64_t &Alignment,
138 llvm::DenseMap<const clang::FieldDecl *, uint64_t> &FieldOffsets,
139 llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
141 llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
142 &VirtualBaseOffsets)
override;
154 void CompleteType(clang::ObjCInterfaceDecl *Class)
override;
188 clang::NamespaceDecl *
215 clang::DeclarationName Name)
override {
220 const clang::DeclContext *DC,
221 llvm::function_ref<
bool(clang::Decl::Kind)> IsKindWeWant,
235 const clang::RecordDecl *Record, uint64_t &Size, uint64_t &Alignment,
236 llvm::DenseMap<const clang::FieldDecl *, uint64_t> &FieldOffsets,
237 llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
239 llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
240 &VirtualBaseOffsets)
override {
242 BaseOffsets, VirtualBaseOffsets);
267 clang::ObjCInterfaceDecl *
340 clang::Decl *
CopyDecl(clang::Decl *src_decl);
363 clang::ObjCInterfaceDecl *original_interface_decl,
const char *log_info);
std::shared_ptr< NamespaceMap > NamespaceMapSP
"lldb/Expression/ClangASTSource.h" Proxy for ClangASTSource
bool FindExternalVisibleDeclsByName(const clang::DeclContext *DC, clang::DeclarationName Name) override
void CompleteType(clang::TagDecl *Tag) override
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
ClangASTSource & m_original
void CompleteType(clang::ObjCInterfaceDecl *Class) override
void FindExternalLexicalDecls(const clang::DeclContext *DC, llvm::function_ref< bool(clang::Decl::Kind)> IsKindWeWant, llvm::SmallVectorImpl< clang::Decl * > &Decls) override
void StartTranslationUnit(clang::ASTConsumer *Consumer) override
ClangASTSourceProxy(ClangASTSource &original)
Provider for named objects defined in the debug info for Clang.
bool FindExternalVisibleDeclsByName(const clang::DeclContext *DC, clang::DeclarationName Name) override
Look up all Decls that match a particular name.
std::set< const char * > m_active_lookups
void LookupInNamespace(NameSearchContext &context)
Performs lookup into a namespace.
uint32_t GetNumExternalSelectors() override
void SetLookupsEnabled(bool lookups_enabled)
clang::TagDecl * FindCompleteType(const clang::TagDecl *decl)
clang::Decl * GetExternalDecl(clang::GlobalDeclID) override
Interface stubs.
clang::ASTContext * m_ast_context
The AST context requests are coming in for.
clang::Selector GetExternalSelector(uint32_t) override
std::set< const clang::Decl * > m_active_lexical_decls
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.
clang::CXXBaseSpecifier * GetExternalCXXBaseSpecifiers(uint64_t Offset) override
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.
clang::Decl * CopyDecl(clang::Decl *src_decl)
Copies a single Decl into the parser's AST context.
bool IgnoreName(const ConstString name, bool ignore_all_dollar_names)
Returns true if a name should be ignored by name lookup.
virtual void FindExternalVisibleDecls(NameSearchContext &context)
The worker function for FindExternalVisibleDeclsByName.
void FindObjCPropertyAndIvarDecls(NameSearchContext &context)
Find all Objective-C properties and ivars with a given name.
TypeSystemClang * GetTypeSystem() const
Returns the TypeSystem that uses this ClangASTSource instance as it's ExternalASTSource.
ClangASTImporter::DeclOrigin GetDeclOrigin(const clang::Decl *decl)
Determined the origin of a single Decl, if it can be found.
bool FindObjCPropertyAndIvarDeclsWithOrigin(NameSearchContext &context, DeclFromUser< const clang::ObjCInterfaceDecl > &origin_iface_decl)
bool FindObjCMethodDeclsWithOrigin(NameSearchContext &context, clang::ObjCInterfaceDecl *original_interface_decl, const char *log_info)
std::shared_ptr< ClangModulesDeclVendor > GetClangModulesDeclVendor()
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...
void FindDeclInObjCRuntime(NameSearchContext &context, ConstString name)
void CompleteType(clang::TagDecl *Tag) override
Complete a TagDecl.
~ClangASTSource() override
Destructor.
void FillNamespaceMap(NameSearchContext &context, lldb::ModuleSP module_sp, const CompilerDeclContext &namespace_decl)
Fills the namespace map of the given NameSearchContext.
void MaterializeVisibleDecls(const clang::DeclContext *DC)
CompilerType GuardedCopyType(const CompilerType &src_type)
A wrapper for TypeSystemClang::CopyType that sets a flag that indicates that we should not respond to...
void FindDeclInModules(NameSearchContext &context, ConstString name)
clang::NamespaceDecl * AddNamespace(NameSearchContext &context, ClangASTImporter::NamespaceMapSP &namespace_decls)
std::shared_ptr< ClangASTImporter > m_ast_importer_sp
The target's AST importer.
void InstallASTContext(TypeSystemClang &ast_context)
TypeSystemClang * m_clang_ast_context
The TypeSystemClang for m_ast_context.
void FindObjCMethodDecls(NameSearchContext &context)
Find all Objective-C methods matching a given selector.
const lldb::TargetSP m_target
The target to use in finding variables and types.
clang::ObjCInterfaceDecl * GetCompleteObjCInterface(const clang::ObjCInterfaceDecl *interface_decl)
Look for the complete version of an Objective-C interface, and return it if found.
void StartTranslationUnit(clang::ASTConsumer *Consumer) override
Called on entering a translation unit.
clang::FileManager * m_file_manager
The file manager paired with the AST context.
clang::Stmt * GetExternalDeclStmt(uint64_t) override
clang::ExternalASTSource * CreateProxy()
Represents a generic declaration context in a program.
Generic representation of a type in a programming language.
A uniqued constant string class.
A TypeSystem implementation based on Clang.
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Target > TargetSP
std::shared_ptr< lldb_private::Module > ModuleSP
"lldb/Expression/ClangASTSource.h" Container for all objects relevant to a single name lookup