class GenerateModuleAction
Declaration
class GenerateModuleAction : public ASTFrontendAction { /* full declaration omitted */ };
Description
Abstract base class to use for AST consumer-based frontend actions.
Declared at: clang/include/clang/Frontend/FrontendActions.h:116
Inherits from: ASTFrontendAction
Member Variables
Method Overview
- protected std::unique_ptr<ASTConsumer> CreateASTConsumer(clang::CompilerInstance & CI, llvm::StringRef InFile)
- private virtual std::unique_ptr<raw_pwrite_stream> CreateOutputFile(clang::CompilerInstance & CI, llvm::StringRef InFile)
- protected clang::TranslationUnitKind getTranslationUnitKind()
- protected bool hasASTFileSupport() const
- protected bool shouldEraseOutputFiles()
Inherited from ASTFrontendAction:
Inherited from FrontendAction:
- protected BeginInvocation
- public BeginSourceFile
- protected BeginSourceFileAction
- protected CreateASTConsumer
- public EndSourceFile
- protected EndSourceFileAction
- public Execute
- protected ExecuteAction
- public PrepareToExecute
- protected PrepareToExecuteAction
- public getCompilerInstance
- public getCurrentASTUnit
- public getCurrentFile
- public getCurrentFileKind
- public getCurrentFileOrBufferName
- public getCurrentInput
- public getCurrentModule
- public getTranslationUnitKind
- public hasASTFileSupport
- public hasCodeCompletionSupport
- public hasIRSupport
- public hasPCHSupport
- public isCurrentFileAST
- public isModelParsingAction
- public setCompilerInstance
- public setCurrentInput
- protected shouldEraseOutputFiles
- public takeCurrentASTUnit
- public usesPreprocessorOnly
Methods
¶std::unique_ptr<ASTConsumer> CreateASTConsumer(
clang::CompilerInstance& CI,
llvm::StringRef InFile)
std::unique_ptr<ASTConsumer> CreateASTConsumer(
clang::CompilerInstance& CI,
llvm::StringRef InFile)
Description
Create the AST consumer object for this action, if supported. This routine is called as part of BeginSourceFile(), which will fail if the AST consumer cannot be created. This will not be called if the action has indicated that it only uses the preprocessor.
Declared at: clang/include/clang/Frontend/FrontendActions.h:121
Parameters
- clang::CompilerInstance& CI
- - The current compiler instance, provided as a convenience, see getCompilerInstance().
- llvm::StringRef InFile
- - The current input file, provided as a convenience, see getCurrentFile().
Returns
The new AST consumer, or null on failure.
¶virtual std::unique_ptr<raw_pwrite_stream>
CreateOutputFile(clang::CompilerInstance& CI,
llvm::StringRef InFile)
virtual std::unique_ptr<raw_pwrite_stream>
CreateOutputFile(clang::CompilerInstance& CI,
llvm::StringRef InFile)
Declared at: clang/include/clang/Frontend/FrontendActions.h:118
Parameters
- clang::CompilerInstance& CI
- llvm::StringRef InFile
¶clang::TranslationUnitKind
getTranslationUnitKind()
clang::TranslationUnitKind
getTranslationUnitKind()
Description
For AST-based actions, the kind of translation unit we're handling.
Declared at: clang/include/clang/Frontend/FrontendActions.h:124
¶bool hasASTFileSupport() const
bool hasASTFileSupport() const
Description
Does this action support use with AST files?
Declared at: clang/include/clang/Frontend/FrontendActions.h:128
¶bool shouldEraseOutputFiles()
bool shouldEraseOutputFiles()
Description
Callback at the end of processing a single input, to determine if the output files should be erased or not. By default it returns true if a compiler error occurred. This is guaranteed to only be called following a successful call to BeginSourceFileAction (and BeginSourceFile).
Declared at: clang/include/clang/Frontend/FrontendActions.h:130