class PCHGenerator
Declaration
class PCHGenerator : public SemaConsumer { /* full declaration omitted */ };
Description
AST and semantic-analysis consumer that generates a precompiled header from the parsed source code.
Declared at: clang/include/clang/Serialization/ASTWriter.h:758
Inherits from: SemaConsumer
Member Variables
- private const clang::Preprocessor& PP
- private std::string OutputFile
- private std::string isysroot
- private clang::Sema* SemaPtr
- private std::shared_ptr<PCHBuffer> Buffer
- private llvm::BitstreamWriter Stream
- private clang::ASTWriter Writer
- private bool AllowASTWithErrors
- private bool ShouldCacheASTInMemory
Method Overview
- public clang::ASTDeserializationListener * GetASTDeserializationListener()
- public clang::ASTMutationListener * GetASTMutationListener()
- public void HandleTranslationUnit(clang::ASTContext & Ctx)
- public void InitializeSema(clang::Sema & S)
- public PCHGenerator(const clang::Preprocessor & PP, clang::InMemoryModuleCache & ModuleCache, llvm::StringRef OutputFile, llvm::StringRef isysroot, std::shared_ptr<PCHBuffer> Buffer, ArrayRef<std::shared_ptr<ModuleFileExtension>> Extensions, bool AllowASTWithErrors = false, bool IncludeTimestamps = true, bool ShouldCacheASTInMemory = false)
- protected SmallVectorImpl<char> & getPCH() const
- protected clang::ASTWriter & getWriter()
- protected const clang::ASTWriter & getWriter() const
- public bool hasEmittedPCH() const
- public ~PCHGenerator()
Inherited from SemaConsumer:
Inherited from ASTConsumer:
- public AssignInheritanceModel
- public CompleteExternalDeclaration
- public CompleteTentativeDefinition
- public GetASTDeserializationListener
- public GetASTMutationListener
- public HandleCXXImplicitFunctionInstantiation
- public HandleCXXStaticMemberVarInstantiation
- public HandleImplicitImportDecl
- public HandleInlineFunctionDefinition
- public HandleInterestingDecl
- public HandleTagDeclDefinition
- public HandleTagDeclRequiredDefinition
- public HandleTopLevelDecl
- public HandleTopLevelDeclInObjCContainer
- public HandleTranslationUnit
- public HandleVTable
- public Initialize
- public PrintStats
- public shouldSkipFunctionBody
Methods
¶clang::ASTDeserializationListener*
GetASTDeserializationListener()
clang::ASTDeserializationListener*
GetASTDeserializationListener()
Description
If the consumer is interested in entities being deserialized from AST files, it should return a pointer to a ASTDeserializationListener here
Declared at: clang/include/clang/Serialization/ASTWriter.h:786
¶clang::ASTMutationListener*
GetASTMutationListener()
clang::ASTMutationListener*
GetASTMutationListener()
Description
If the consumer is interested in entities getting modified after their initial creation, it should return a pointer to an ASTMutationListener here.
Declared at: clang/include/clang/Serialization/ASTWriter.h:785
¶void HandleTranslationUnit(clang::ASTContext& Ctx)
void HandleTranslationUnit(clang::ASTContext& Ctx)
Description
HandleTranslationUnit - This method is called when the ASTs for entire translation unit have been parsed.
Declared at: clang/include/clang/Serialization/ASTWriter.h:784
Parameters
- clang::ASTContext& Ctx
¶void InitializeSema(clang::Sema& S)
void InitializeSema(clang::Sema& S)
Description
Initialize the semantic consumer with the Sema instance being used to perform semantic analysis on the abstract syntax tree.
Declared at: clang/include/clang/Serialization/ASTWriter.h:783
Parameters
- clang::Sema& S
¶PCHGenerator(
const clang::Preprocessor& PP,
clang::InMemoryModuleCache& ModuleCache,
llvm::StringRef OutputFile,
llvm::StringRef isysroot,
std::shared_ptr<PCHBuffer> Buffer,
ArrayRef<std::shared_ptr<ModuleFileExtension>>
Extensions,
bool AllowASTWithErrors = false,
bool IncludeTimestamps = true,
bool ShouldCacheASTInMemory = false)
PCHGenerator(
const clang::Preprocessor& PP,
clang::InMemoryModuleCache& ModuleCache,
llvm::StringRef OutputFile,
llvm::StringRef isysroot,
std::shared_ptr<PCHBuffer> Buffer,
ArrayRef<std::shared_ptr<ModuleFileExtension>>
Extensions,
bool AllowASTWithErrors = false,
bool IncludeTimestamps = true,
bool ShouldCacheASTInMemory = false)
Declared at: clang/include/clang/Serialization/ASTWriter.h:775
Parameters
- const clang::Preprocessor& PP
- clang::InMemoryModuleCache& ModuleCache
- llvm::StringRef OutputFile
- llvm::StringRef isysroot
- std::shared_ptr<PCHBuffer> Buffer
- ArrayRef<std::shared_ptr<ModuleFileExtension>> Extensions
- bool AllowASTWithErrors = false
- bool IncludeTimestamps = true
- bool ShouldCacheASTInMemory = false
¶SmallVectorImpl<char>& getPCH() const
SmallVectorImpl<char>& getPCH() const
Declared at: clang/include/clang/Serialization/ASTWriter.h:772
¶clang::ASTWriter& getWriter()
clang::ASTWriter& getWriter()
Declared at: clang/include/clang/Serialization/ASTWriter.h:770
¶const clang::ASTWriter& getWriter() const
const clang::ASTWriter& getWriter() const
Declared at: clang/include/clang/Serialization/ASTWriter.h:771
¶bool hasEmittedPCH() const
bool hasEmittedPCH() const
Declared at: clang/include/clang/Serialization/ASTWriter.h:787
¶~PCHGenerator()
~PCHGenerator()
Declared at: clang/include/clang/Serialization/ASTWriter.h:781