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 *
 
   88                                 clang::DeclarationName Name,
 
   89                                 const clang::DeclContext *OriginalDC) 
override;
 
  103      const clang::DeclContext *DC,
 
  104      llvm::function_ref<
bool(clang::Decl::Kind)> IsKindWeWant,
 
  139      const clang::RecordDecl *Record, uint64_t &Size, uint64_t &Alignment,
 
  140      llvm::DenseMap<const clang::FieldDecl *, uint64_t> &FieldOffsets,
 
  141      llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
 
  143      llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
 
  144          &VirtualBaseOffsets) 
override;
 
  156  void CompleteType(clang::ObjCInterfaceDecl *Class) 
override;
 
  190  clang::NamespaceDecl *
 
  217        const clang::DeclContext *DC, clang::DeclarationName Name,
 
  218        const clang::DeclContext *OriginalDC)
 override {
 
  219      return m_original.FindExternalVisibleDeclsByName(DC, Name, OriginalDC);
 
 
  223        const clang::DeclContext *DC,
 
  224        llvm::function_ref<
bool(clang::Decl::Kind)> IsKindWeWant,
 
  226      return m_original.FindExternalLexicalDecls(DC, IsKindWeWant, Decls);
 
 
  238        const clang::RecordDecl *Record, uint64_t &Size, uint64_t &Alignment,
 
  239        llvm::DenseMap<const clang::FieldDecl *, uint64_t> &FieldOffsets,
 
  240        llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
 
  242        llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
 
  243            &VirtualBaseOffsets)
 override {
 
  244      return m_original.layoutRecordType(Record, Size, Alignment, FieldOffsets,
 
  245                                         BaseOffsets, VirtualBaseOffsets);
 
 
  249      return m_original.StartTranslationUnit(Consumer);
 
 
 
  256  llvm::IntrusiveRefCntPtr<clang::ExternalASTSource> 
CreateProxy() {
 
  257    return llvm::makeIntrusiveRefCnt<ClangASTSourceProxy>(*
this);
 
 
  270  clang::ObjCInterfaceDecl *
 
  343  clang::Decl *
CopyDecl(clang::Decl *src_decl);
 
  366      clang::ObjCInterfaceDecl *original_interface_decl, 
const char *log_info);
 
 
std::shared_ptr< NamespaceMap > NamespaceMapSP
 
bool FindExternalVisibleDeclsByName(const clang::DeclContext *DC, clang::DeclarationName Name, const clang::DeclContext *OriginalDC) 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)
 
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.
 
ClangASTSource(const lldb::TargetSP &target, const std::shared_ptr< ClangASTImporter > &importer)
Constructor.
 
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.
 
friend struct NameSearchContext
 
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)
 
bool FindExternalVisibleDeclsByName(const clang::DeclContext *DC, clang::DeclarationName Name, const clang::DeclContext *OriginalDC) override
Look up all Decls that match a particular name.
 
clang::NamespaceDecl * AddNamespace(NameSearchContext &context, ClangASTImporter::NamespaceMapSP &namespace_decls)
 
llvm::IntrusiveRefCntPtr< clang::ExternalASTSource > CreateProxy()
 
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
 
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