class PreambleCallbacks
Declaration
class PreambleCallbacks { /* full declaration omitted */ };
Description
A set of callbacks to gather useful information while building a preamble.
Declared at: clang/include/clang/Frontend/PrecompiledPreamble.h:206
Method Overview
- public virtual void AfterExecute(clang::CompilerInstance & CI)
- public virtual void AfterPCHEmitted(clang::ASTWriter & Writer)
- public virtual void BeforeExecute(clang::CompilerInstance & CI)
- public virtual void HandleTopLevelDecl(clang::DeclGroupRef DG)
- public virtual std::unique_ptr<PPCallbacks> createPPCallbacks()
- public virtual clang::CommentHandler * getCommentHandler()
- public virtual bool shouldSkipFunctionBody(clang::Decl * D)
- public virtual ~PreambleCallbacks()
Methods
¶virtual void AfterExecute(
clang::CompilerInstance& CI)
virtual void AfterExecute(
clang::CompilerInstance& CI)
Description
Called after FrontendAction::Execute(), but before FrontendAction::EndSourceFile(). Can be used to transfer ownership of various CompilerInstance fields before they are destroyed.
Declared at: clang/include/clang/Frontend/PrecompiledPreamble.h:218
Parameters
¶virtual void AfterPCHEmitted(
clang::ASTWriter& Writer)
virtual void AfterPCHEmitted(
clang::ASTWriter& Writer)
Description
Called after PCH has been emitted. \p Writer may be used to retrieve information about AST, serialized in PCH.
Declared at: clang/include/clang/Frontend/PrecompiledPreamble.h:221
Parameters
- clang::ASTWriter& Writer
¶virtual void BeforeExecute(
clang::CompilerInstance& CI)
virtual void BeforeExecute(
clang::CompilerInstance& CI)
Description
Called before FrontendAction::Execute. Can be used to store references to various CompilerInstance fields (e.g. SourceManager) that may be interesting to the consumers of other callbacks.
Declared at: clang/include/clang/Frontend/PrecompiledPreamble.h:214
Parameters
¶virtual void HandleTopLevelDecl(
clang::DeclGroupRef DG)
virtual void HandleTopLevelDecl(
clang::DeclGroupRef DG)
Description
Called for each TopLevelDecl. NOTE: To allow more flexibility a custom ASTConsumer could probably be used instead, but having only this method allows a simpler API.
Declared at: clang/include/clang/Frontend/PrecompiledPreamble.h:225
Parameters
¶virtual std::unique_ptr<PPCallbacks>
createPPCallbacks()
virtual std::unique_ptr<PPCallbacks>
createPPCallbacks()
Description
Creates wrapper class for PPCallbacks so we can also process information about includes that are inside of a preamble. Called after BeforeExecute.
Declared at: clang/include/clang/Frontend/PrecompiledPreamble.h:228
¶virtual clang::CommentHandler* getCommentHandler()
virtual clang::CommentHandler* getCommentHandler()
Description
The returned CommentHandler will be added to the preprocessor if not null.
Declared at: clang/include/clang/Frontend/PrecompiledPreamble.h:230
¶virtual bool shouldSkipFunctionBody(
clang::Decl* D)
virtual bool shouldSkipFunctionBody(
clang::Decl* D)
Description
Determines which function bodies are parsed, by default skips everything. Only used if FrontendOpts::SkipFunctionBodies is true. See ASTConsumer::shouldSkipFunctionBody.
Declared at: clang/include/clang/Frontend/PrecompiledPreamble.h:234
Parameters
- clang::Decl* D
¶virtual ~PreambleCallbacks()
virtual ~PreambleCallbacks()
Declared at: clang/include/clang/Frontend/PrecompiledPreamble.h:208