clang API Documentation

Public Member Functions | Protected Member Functions
clang::PCHGenerator Class Reference

AST and semantic-analysis consumer that generates a precompiled header from the parsed source code. More...

#include <ASTWriter.h>

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

List of all members.

Public Member Functions

 PCHGenerator (const Preprocessor &PP, StringRef OutputFile, clang::Module *Module, StringRef isysroot, raw_ostream *Out, bool AllowASTWithErrors=false)
 ~PCHGenerator ()
void InitializeSema (Sema &S) override
 Initialize the semantic consumer with the Sema instance being used to perform semantic analysis on the abstract syntax tree.
void HandleTranslationUnit (ASTContext &Ctx) override
ASTMutationListenerGetASTMutationListener () override
 If the consumer is interested in entities getting modified after their initial creation, it should return a pointer to an ASTMutationListener here.
ASTDeserializationListenerGetASTDeserializationListener () override
 If the consumer is interested in entities being deserialized from AST files, it should return a pointer to a ASTDeserializationListener here.
bool hasEmittedPCH () const

Protected Member Functions

ASTWritergetWriter ()
const ASTWritergetWriter () const

Detailed Description

AST and semantic-analysis consumer that generates a precompiled header from the parsed source code.

Definition at line 806 of file ASTWriter.h.


Constructor & Destructor Documentation

PCHGenerator::PCHGenerator ( const Preprocessor PP,
StringRef  OutputFile,
clang::Module Module,
StringRef  isysroot,
raw_ostream *  Out,
bool  AllowASTWithErrors = false 
)

Definition at line 27 of file GeneratePCH.cpp.

Definition at line 39 of file GeneratePCH.cpp.


Member Function Documentation

If the consumer is interested in entities being deserialized from AST files, it should return a pointer to a ASTDeserializationListener here.

Reimplemented from clang::ASTConsumer.

Definition at line 71 of file GeneratePCH.cpp.

If the consumer is interested in entities getting modified after their initial creation, it should return a pointer to an ASTMutationListener here.

Reimplemented from clang::ASTConsumer.

Definition at line 67 of file GeneratePCH.cpp.

ASTWriter& clang::PCHGenerator::getWriter ( ) [inline, protected]

Definition at line 820 of file ASTWriter.h.

const ASTWriter& clang::PCHGenerator::getWriter ( ) const [inline, protected]

Definition at line 821 of file ASTWriter.h.

void PCHGenerator::HandleTranslationUnit ( ASTContext Ctx) [override, virtual]

HandleTranslationUnit - This method is called when the ASTs for entire translation unit have been parsed.

Reimplemented from clang::ASTConsumer.

Definition at line 42 of file GeneratePCH.cpp.

References clang::Preprocessor::getDiagnostics(), clang::Preprocessor::getModuleLoader(), clang::ModuleLoader::HadFatalFailure, clang::DiagnosticsEngine::hasErrorOccurred(), and clang::ASTWriter::WriteAST().

Definition at line 834 of file ASTWriter.h.

void clang::PCHGenerator::InitializeSema ( Sema S) [inline, override, virtual]

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

Reimplemented from clang::SemaConsumer.

Definition at line 829 of file ASTWriter.h.

References S.


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