clang  6.0.0svn
Public Member Functions | List of all members
clang::PreambleCallbacks Class Reference

A set of callbacks to gather useful information while building a preamble. More...

#include "clang/Frontend/PrecompiledPreamble.h"

Public Member Functions

virtual ~PreambleCallbacks ()=default
 
virtual void AfterExecute (CompilerInstance &CI)
 Called after FrontendAction::Execute(), but before FrontendAction::EndSourceFile(). More...
 
virtual void AfterPCHEmitted (ASTWriter &Writer)
 Called after PCH has been emitted. More...
 
virtual void HandleTopLevelDecl (DeclGroupRef DG)
 Called for each TopLevelDecl. More...
 
virtual void HandleMacroDefined (const Token &MacroNameTok, const MacroDirective *MD)
 Called for each macro defined in the Preamble. More...
 

Detailed Description

A set of callbacks to gather useful information while building a preamble.

Definition at line 243 of file PrecompiledPreamble.h.

Constructor & Destructor Documentation

◆ ~PreambleCallbacks()

virtual clang::PreambleCallbacks::~PreambleCallbacks ( )
virtualdefault

Member Function Documentation

◆ AfterExecute()

void PreambleCallbacks::AfterExecute ( CompilerInstance CI)
virtual

Called after FrontendAction::Execute(), but before FrontendAction::EndSourceFile().

Can be used to transfer ownership of various CompilerInstance fields before they are destroyed.

Definition at line 707 of file PrecompiledPreamble.cpp.

Referenced by clang::PrecompiledPreamble::Build().

◆ AfterPCHEmitted()

void PreambleCallbacks::AfterPCHEmitted ( ASTWriter Writer)
virtual

Called after PCH has been emitted.

Writer may be used to retrieve information about AST, serialized in PCH.

Definition at line 708 of file PrecompiledPreamble.cpp.

◆ HandleMacroDefined()

void PreambleCallbacks::HandleMacroDefined ( const Token MacroNameTok,
const MacroDirective MD 
)
virtual

Called for each macro defined in the Preamble.

NOTE: To allow more flexibility a custom PPCallbacks could probably be used instead, but having only this method allows a simpler API.

Definition at line 710 of file PrecompiledPreamble.cpp.

◆ HandleTopLevelDecl()

void PreambleCallbacks::HandleTopLevelDecl ( DeclGroupRef  DG)
virtual

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.

Definition at line 709 of file PrecompiledPreamble.cpp.


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