Go to the documentation of this file.
9 #ifndef LLVM_CLANG_FRONTEND_FRONTENDACTIONS_H
10 #define LLVM_CLANG_FRONTEND_FRONTENDACTIONS_H
24 void ExecuteAction()
override;
27 StringRef InFile)
override;
37 void ExecuteAction()
override;
40 StringRef InFile)
override;
48 StringRef InFile)
override {
52 void ExecuteAction()
override;
65 StringRef InFile)
override;
71 StringRef InFile)
override;
77 StringRef InFile)
override;
83 StringRef InFile)
override;
89 StringRef InFile)
override;
109 static std::unique_ptr<llvm::raw_pwrite_stream>
117 virtual std::unique_ptr<raw_pwrite_stream>
122 StringRef InFile)
override;
136 StringRef InFile)
override;
146 std::unique_ptr<raw_pwrite_stream>
154 std::unique_ptr<raw_pwrite_stream>
160 std::unique_ptr<llvm::MemoryBuffer> Buffer;
161 std::vector<std::string> ModuleHeaders;
167 std::unique_ptr<raw_pwrite_stream>
176 std::unique_ptr<raw_pwrite_stream>
183 StringRef InFile)
override;
195 StringRef InFile)
override;
209 StringRef InFile)
override;
220 StringRef InFile)
override;
235 std::unique_ptr<FrontendAction> AdaptedAction;
238 std::vector<std::string> ASTFiles;
242 StringRef InFile)
override;
265 StringRef)
override {
276 StringRef)
override {
310 StringRef ModuleName;
311 void ExecuteAction()
override;
315 : ModuleName(ModuleName) {}
Preprocessor-based frontend action that also loads PCH files.
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
bool hasASTFileSupport() const override
Does this action support use with AST files?
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &, StringRef) override
Create the AST consumer object for this action, if supported.
Abstract base class to use for preprocessor-based frontend actions.
bool shouldEraseOutputFiles() override
Callback at the end of processing a single input, to determine if the output files should be erased o...
bool BeginSourceFileAction(CompilerInstance &CI) override
Callback at the start of processing a single input.
void ExecuteAction() override
Callback to run the program action, using the initialized compiler instance.
bool hasCodeCompletionSupport() const override
Does this action support use with code completion?
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
bool hasPCHSupport() const override
Does this action support use with PCH?
void ExecuteAction() override
Callback to run the program action, using the initialized compiler instance.
bool hasASTFileSupport() const override
Does this action support use with AST files?
friend class ASTMergeAction
bool hasPCHSupport() const override
Does this action support use with PCH?
bool BeginInvocation(CompilerInstance &CI) override
Callback before starting processing a single input, giving the opportunity to modify the CompilerInvo...
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
@ TU_Prefix
The translation unit is a prefix to a translation unit, and is not complete.
void ExecuteAction() override
Callback to run the program action, using the initialized compiler instance.
void ExecuteAction() override
Implement the ExecuteAction interface by running Sema on the already-initialized AST consumer.
static std::unique_ptr< llvm::raw_pwrite_stream > CreateOutputFile(CompilerInstance &CI, StringRef InFile, std::string &OutputFile)
Creates file to write the PCH into and returns a stream to write it into.
void ExecuteAction() override
Callback to run the program action, using the initialized compiler instance.
@ TU_Module
The translation unit is a module.
void ExecuteAction() override
Implement the ExecuteAction interface by running Sema on the already-initialized AST consumer.
bool shouldEraseOutputFiles() override
Callback at the end of processing a single input, to determine if the output files should be erased o...
bool hasIRSupport() const override
Does this action support use with IR files?
bool hasCodeCompletionSupport() const override
Does this action support use with code completion?
Dump information about the given module file, to be used for basic debugging and discovery.
bool usesPreprocessorOnly() const override
Does this action only use the preprocessor?
~SyntaxOnlyAction() override
bool usesPreprocessorOnly() const override
Does this action only use the preprocessor?
bool hasCodeCompletionSupport() const override
Does this action support use with code completion?
bool hasASTFileSupport() const override
Does this action support use with AST files?
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
~ASTMergeAction() override
bool hasASTFileSupport() const override
Does this action support use with AST files?
bool hasASTFileSupport() const override
Does this action support use with AST files?
bool hasPCHSupport() const override
Does this action support use with PCH?
static bool ComputeASTConsumerArguments(CompilerInstance &CI, std::string &Sysroot)
Compute the AST consumer arguments that will be used to create the PCHGenerator instance returned by ...
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &, StringRef) override
Create the AST consumer object for this action, if supported.
bool usesPreprocessorOnly() const override
Does this action only use the preprocessor?
Frontend action adaptor that merges ASTs together.
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
void ExecuteAction() override
Callback to run the program action, using the initialized compiler instance.
void ExecuteAction() override
Callback to run the program action, using the initialized compiler instance.
bool hasCodeCompletionSupport() const override
Does this action support use with code completion?
TranslationUnitKind getTranslationUnitKind() override
For AST-based actions, the kind of translation unit we're handling.
TranslationUnitKind
Describes the kind of translation unit being processed.
Abstract base class for actions which can be performed by the frontend.
bool usesPreprocessorOnly() const override
Does this action only use the preprocessor?
void ExecuteAction() override
Implement the ExecuteAction interface by running Sema on the already-initialized AST consumer.
bool usesPreprocessorOnly() const override
Does this action only use the preprocessor?
void EndSourceFileAction() override
Callback at the end of processing a single input.
TranslationUnitKind getTranslationUnitKind() override
For AST-based actions, the kind of translation unit we're handling.
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
Abstract base class to use for AST consumer-based frontend actions.
GetDependenciesByModuleNameAction(StringRef ModuleName)
TranslationUnitKind getTranslationUnitKind() override
For AST-based actions, the kind of translation unit we're handling.
void ExecuteAction() override
Callback to run the program action, using the initialized compiler instance.
TranslationUnitKind getTranslationUnitKind() override
For AST-based actions, the kind of translation unit we're handling.
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
bool BeginSourceFileAction(CompilerInstance &CI) override
Callback at the start of processing a single input.
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
bool usesPreprocessorOnly() const override
Does this action only use the preprocessor?