clang API Documentation
AST and semantic-analysis consumer that generates a precompiled header from the parsed source code. More...
#include <ASTWriter.h>


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 |
| ASTMutationListener * | GetASTMutationListener () override |
| If the consumer is interested in entities getting modified after their initial creation, it should return a pointer to an ASTMutationListener here. | |
| ASTDeserializationListener * | GetASTDeserializationListener () 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 | |
| ASTWriter & | getWriter () |
| const ASTWriter & | getWriter () const |
AST and semantic-analysis consumer that generates a precompiled header from the parsed source code.
Definition at line 806 of file ASTWriter.h.
| 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.
| ASTDeserializationListener * PCHGenerator::GetASTDeserializationListener | ( | ) | [override, virtual] |
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.
| ASTMutationListener * PCHGenerator::GetASTMutationListener | ( | ) | [override, virtual] |
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().
| bool clang::PCHGenerator::hasEmittedPCH | ( | ) | const [inline] |
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.