clang API Documentation

Public Member Functions | Static Public Member Functions | Protected Member Functions
clang::ChainedIncludesSource Class Reference

#include <ChainedIncludesSource.h>

Inheritance diagram for clang::ChainedIncludesSource:
Inheritance graph
[legend]
Collaboration diagram for clang::ChainedIncludesSource:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~ChainedIncludesSource ()

Static Public Member Functions

static ChainedIncludesSourcecreate (CompilerInstance &CI)

Protected Member Functions

virtual DeclGetExternalDecl (uint32_t ID)
 Resolve a declaration ID into a declaration, potentially building a new declaration.
virtual Selector GetExternalSelector (uint32_t ID)
 Resolve a selector ID into a selector.
virtual uint32_t GetNumExternalSelectors ()
 Returns the number of selectors known to the external AST source.
virtual StmtGetExternalDeclStmt (uint64_t Offset)
 Resolve the offset of a statement in the decl stream into a statement.
virtual CXXBaseSpecifierGetExternalCXXBaseSpecifiers (uint64_t Offset)
 Resolve the offset of a set of C++ base specifiers in the decl stream into an array of specifiers.
virtual DeclContextLookupResult FindExternalVisibleDeclsByName (const DeclContext *DC, DeclarationName Name)
 Finds all declarations with the given name in the given context.
virtual ExternalLoadResult FindExternalLexicalDecls (const DeclContext *DC, bool(*isKindWeWant)(Decl::Kind), SmallVectorImpl< Decl * > &Result)
 Finds all declarations lexically contained within the given DeclContext, after applying an optional filter predicate.
virtual void CompleteType (TagDecl *Tag)
 Gives the external AST source an opportunity to complete an incomplete type.
virtual void CompleteType (ObjCInterfaceDecl *Class)
 Gives the external AST source an opportunity to complete an incomplete Objective-C class.
virtual void StartedDeserializing ()
 Notify ExternalASTSource that we started deserialization of a decl or type so until FinishedDeserializing is called there may be decls that are initializing. Must be paired with FinishedDeserializing.
virtual void FinishedDeserializing ()
 Notify ExternalASTSource that we finished the deserialization of a decl or type. Must be paired with StartedDeserializing.
virtual void StartTranslationUnit (ASTConsumer *Consumer)
 Function that will be invoked when we begin parsing a new translation unit involving this external AST source.
virtual void PrintStats ()
 Print any statistics that have been gathered regarding the external AST source.
virtual void getMemoryBufferSizes (MemoryBufferSizes &sizes) const
virtual void InitializeSema (Sema &S)
 Initialize the semantic source with the Sema instance being used to perform semantic analysis on the abstract syntax tree.
virtual void ForgetSema ()
 Inform the semantic consumer that Sema is no longer available.
virtual void ReadMethodPool (Selector Sel)
 Load the contents of the global method pool for a given selector.
virtual bool LookupUnqualified (LookupResult &R, Scope *S)
 Do last resort, unqualified lookup on a LookupResult that Sema cannot find.

Detailed Description

Definition at line 23 of file ChainedIncludesSource.h.


Constructor & Destructor Documentation

ChainedIncludesSource::~ChainedIncludesSource ( ) [virtual]

Definition at line 55 of file ChainedIncludesSource.cpp.


Member Function Documentation

void ChainedIncludesSource::CompleteType ( TagDecl Tag) [protected, virtual]

Gives the external AST source an opportunity to complete an incomplete type.

Reimplemented from clang::ExternalASTSource.

Definition at line 199 of file ChainedIncludesSource.cpp.

References clang::ExternalASTSource::CompleteType().

void ChainedIncludesSource::CompleteType ( ObjCInterfaceDecl Class) [protected, virtual]

Gives the external AST source an opportunity to complete an incomplete Objective-C class.

This routine will only be invoked if the "externally completed" bit is set on the ObjCInterfaceDecl via the function ObjCInterfaceDecl::setExternallyCompleted().

Reimplemented from clang::ExternalASTSource.

Definition at line 202 of file ChainedIncludesSource.cpp.

References clang::ExternalASTSource::CompleteType().

ChainedIncludesSource * ChainedIncludesSource::create ( CompilerInstance CI) [static]
ExternalLoadResult ChainedIncludesSource::FindExternalLexicalDecls ( const DeclContext DC,
bool(*)(Decl::Kind isKindWeWant,
SmallVectorImpl< Decl * > &  Result 
) [protected, virtual]

Finds all declarations lexically contained within the given DeclContext, after applying an optional filter predicate.

Parameters:
isKindWeWanta predicate function that returns true if the passed declaration kind is one we are looking for. If NULL, all declarations are returned.
Returns:
an indication of whether the load succeeded or failed.

The default implementation of this method is a no-op.

Reimplemented from clang::ExternalASTSource.

Definition at line 194 of file ChainedIncludesSource.cpp.

References clang::ExternalASTSource::FindExternalLexicalDecls().

DeclContextLookupResult ChainedIncludesSource::FindExternalVisibleDeclsByName ( const DeclContext DC,
DeclarationName  Name 
) [protected, virtual]

Finds all declarations with the given name in the given context.

Generally the final step of this method is either to call SetExternalVisibleDeclsForName or to recursively call lookup on the DeclContext after calling SetExternalVisibleDecls.

The default implementation of this method is a no-op.

Reimplemented from clang::ExternalASTSource.

Definition at line 189 of file ChainedIncludesSource.cpp.

References clang::ExternalASTSource::FindExternalVisibleDeclsByName().

void ChainedIncludesSource::FinishedDeserializing ( ) [protected, virtual]

Notify ExternalASTSource that we finished the deserialization of a decl or type. Must be paired with StartedDeserializing.

The default implementation of this method is a no-op.

Reimplemented from clang::ExternalASTSource.

Definition at line 208 of file ChainedIncludesSource.cpp.

References clang::ExternalASTSource::FinishedDeserializing().

void ChainedIncludesSource::ForgetSema ( ) [protected, virtual]

Inform the semantic consumer that Sema is no longer available.

Reimplemented from clang::ExternalSemaSource.

Definition at line 231 of file ChainedIncludesSource.cpp.

References clang::ExternalSemaSource::ForgetSema().

CXXBaseSpecifier * ChainedIncludesSource::GetExternalCXXBaseSpecifiers ( uint64_t  Offset) [protected, virtual]

Resolve the offset of a set of C++ base specifiers in the decl stream into an array of specifiers.

The default implementation of this method is a no-op.

Reimplemented from clang::ExternalASTSource.

Definition at line 185 of file ChainedIncludesSource.cpp.

References clang::ExternalASTSource::GetExternalCXXBaseSpecifiers().

Decl * ChainedIncludesSource::GetExternalDecl ( uint32_t  ID) [protected, virtual]

Resolve a declaration ID into a declaration, potentially building a new declaration.

This method only needs to be implemented if the AST source ever passes back decl sets as VisibleDeclaration objects.

The default implementation of this method is a no-op.

Reimplemented from clang::ExternalASTSource.

Definition at line 172 of file ChainedIncludesSource.cpp.

References clang::ExternalASTSource::GetExternalDecl().

Stmt * ChainedIncludesSource::GetExternalDeclStmt ( uint64_t  Offset) [protected, virtual]

Resolve the offset of a statement in the decl stream into a statement.

This operation is meant to be used via a LazyOffsetPtr. It only needs to be implemented if the AST source uses methods like FunctionDecl::setLazyBody when building decls.

The default implementation of this method is a no-op.

Reimplemented from clang::ExternalASTSource.

Definition at line 181 of file ChainedIncludesSource.cpp.

References clang::ExternalASTSource::GetExternalDeclStmt().

Selector ChainedIncludesSource::GetExternalSelector ( uint32_t  ID) [protected, virtual]

Resolve a selector ID into a selector.

This operation only needs to be implemented if the AST source returns non-zero for GetNumKnownSelectors().

The default implementation of this method is a no-op.

Reimplemented from clang::ExternalASTSource.

Definition at line 175 of file ChainedIncludesSource.cpp.

References clang::ExternalASTSource::GetExternalSelector().

void ChainedIncludesSource::getMemoryBufferSizes ( MemoryBufferSizes sizes) const [protected, virtual]

Return the amount of memory used by memory buffers, breaking down by heap-backed versus mmap'ed memory.

Reimplemented from clang::ExternalASTSource.

Definition at line 217 of file ChainedIncludesSource.cpp.

References clang::ExternalASTSource::getMemoryBufferSizes().

uint32_t ChainedIncludesSource::GetNumExternalSelectors ( ) [protected, virtual]

Returns the number of selectors known to the external AST source.

The default implementation of this method is a no-op.

Reimplemented from clang::ExternalASTSource.

Definition at line 178 of file ChainedIncludesSource.cpp.

References clang::ExternalASTSource::GetNumExternalSelectors().

void ChainedIncludesSource::InitializeSema ( Sema S) [protected, virtual]

Initialize the semantic source with the Sema instance being used to perform semantic analysis on the abstract syntax tree.

Reimplemented from clang::ExternalSemaSource.

Definition at line 228 of file ChainedIncludesSource.cpp.

References clang::ExternalSemaSource::InitializeSema().

bool ChainedIncludesSource::LookupUnqualified ( LookupResult R,
Scope S 
) [protected, virtual]

Do last resort, unqualified lookup on a LookupResult that Sema cannot find.

Parameters:
Ra LookupResult that is being recovered.
Sthe Scope of the identifier occurrence.
Returns:
true to tell Sema to recover using the LookupResult.

Reimplemented from clang::ExternalSemaSource.

Definition at line 237 of file ChainedIncludesSource.cpp.

References clang::ExternalSemaSource::LookupUnqualified().

void ChainedIncludesSource::PrintStats ( ) [protected, virtual]

Print any statistics that have been gathered regarding the external AST source.

The default implementation of this method is a no-op.

Reimplemented from clang::ExternalASTSource.

Definition at line 214 of file ChainedIncludesSource.cpp.

References clang::ExternalASTSource::PrintStats().

void ChainedIncludesSource::ReadMethodPool ( Selector  Sel) [protected, virtual]

Load the contents of the global method pool for a given selector.

Reimplemented from clang::ExternalSemaSource.

Definition at line 234 of file ChainedIncludesSource.cpp.

References clang::ExternalSemaSource::ReadMethodPool().

void ChainedIncludesSource::StartedDeserializing ( ) [protected, virtual]

Notify ExternalASTSource that we started deserialization of a decl or type so until FinishedDeserializing is called there may be decls that are initializing. Must be paired with FinishedDeserializing.

The default implementation of this method is a no-op.

Reimplemented from clang::ExternalASTSource.

Definition at line 205 of file ChainedIncludesSource.cpp.

References clang::ExternalASTSource::StartedDeserializing().

void ChainedIncludesSource::StartTranslationUnit ( ASTConsumer Consumer) [protected, virtual]

Function that will be invoked when we begin parsing a new translation unit involving this external AST source.

The default implementation of this method is a no-op.

Reimplemented from clang::ExternalASTSource.

Definition at line 211 of file ChainedIncludesSource.cpp.

References clang::ExternalASTSource::StartTranslationUnit().


The documentation for this class was generated from the following files: