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;
105 std::string &Sysroot);
109 static std::unique_ptr<llvm::raw_pwrite_stream>
111 std::string &OutputFile);
117 virtual std::unique_ptr<raw_pwrite_stream>
121 std::vector<std::unique_ptr<ASTConsumer>>
125 StringRef InFile)
override;
139 StringRef InFile)
override;
151 std::unique_ptr<raw_pwrite_stream>
162 StringRef InFile)
override;
166 std::unique_ptr<raw_pwrite_stream>
175 StringRef InFile)
override;
183 std::unique_ptr<raw_pwrite_stream>
190 StringRef InFile)
override;
201 std::shared_ptr<llvm::raw_ostream> OutputStream;
205 StringRef InFile)
override;
212 : OutputStream(Out) {}
222 StringRef InFile)
override;
233 StringRef InFile)
override;
248 std::unique_ptr<FrontendAction> AdaptedAction;
251 std::vector<std::string> ASTFiles;
255 StringRef InFile)
override;
278 StringRef)
override {
289 StringRef)
override {
323 StringRef ModuleName;
324 void ExecuteAction()
override;
328 : ModuleName(ModuleName) {}
Defines the clang::FrontendAction interface and various convenience abstract classes (clang::ASTFront...
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.
Abstract base class to use for AST consumer-based frontend actions.
Frontend action adaptor that merges ASTs together.
bool hasCodeCompletionSupport() const override
Does this action support use with code completion?
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.
~ASTMergeAction() override
bool usesPreprocessorOnly() const override
Does this action only use the preprocessor?
bool hasASTFileSupport() const override
Does this action support use with AST files?
void ExecuteAction() override
Callback to run the program action, using the initialized compiler instance.
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.
bool hasPCHSupport() const override
Does this action support use with PCH?
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.
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
bool usesPreprocessorOnly() const override
Does this action only use the preprocessor?
Dump information about the given module file, to be used for basic debugging and discovery.
DumpModuleInfoAction()=default
DumpModuleInfoAction(std::shared_ptr< llvm::raw_ostream > Out)
bool hasCodeCompletionSupport() const override
Does this action support use with code completion?
bool hasASTFileSupport() const override
Does this action support use with AST files?
bool hasIRSupport() const override
Does this action support use with IR files?
bool hasPCHSupport() const override
Does this action support use with PCH?
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
void ExecuteAction() override
Implement the ExecuteAction interface by running Sema on the already-initialized AST consumer.
bool BeginInvocation(CompilerInstance &CI) override
Callback before starting processing a single input, giving the opportunity to modify the CompilerInvo...
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.
Abstract base class for actions which can be performed by the frontend.
friend class ASTMergeAction
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 hasASTFileSupport() const override
Does this action support use with AST files?
bool shouldEraseOutputFiles() override
Callback at the end of processing a single input, to determine if the output files should be erased o...
TranslationUnitKind getTranslationUnitKind() override
For AST-based actions, the kind of translation unit we're handling.
bool hasASTFileSupport() const override
Does this action support use with AST files?
std::vector< std::unique_ptr< ASTConsumer > > CreateMultiplexConsumer(CompilerInstance &CI, StringRef InFile)
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
Generates full BMI (which contains full information to generate the object files) for C++20 Named Mod...
TranslationUnitKind getTranslationUnitKind() override
For AST-based actions, the kind of translation unit we're handling.
bool BeginSourceFileAction(CompilerInstance &CI) override
Callback at the start of processing a single input.
std::unique_ptr< raw_pwrite_stream > CreateOutputFile(CompilerInstance &CI, StringRef InFile) override
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
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.
bool BeginSourceFileAction(CompilerInstance &CI) override
Callback at the start of processing a single input.
TranslationUnitKind getTranslationUnitKind() override
For AST-based actions, the kind of translation unit we're handling.
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.
bool hasASTFileSupport() const override
Does this action support use with AST files?
bool shouldEraseOutputFiles() override
Callback at the end of processing a single input, to determine if the output files should be erased o...
Only generates the reduced BMI. This action is mainly used by tests.
GetDependenciesByModuleNameAction(StringRef ModuleName)
bool usesPreprocessorOnly() const override
Does this action only use the preprocessor?
void ExecuteAction() override
Callback to run the program action, using the initialized compiler instance.
Abstract base class to use for preprocessor-based frontend actions.
bool usesPreprocessorOnly() const override
Does this action only use the preprocessor?
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &, StringRef) 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.
bool usesPreprocessorOnly() const override
Does this action only use the preprocessor?
void ExecuteAction() override
Callback to run the program action, using the initialized compiler instance.
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &, StringRef) 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.
bool hasPCHSupport() const override
Does this action support use with PCH?
Preprocessor-based frontend action that also loads PCH files.
bool usesPreprocessorOnly() const override
Does this action only use the preprocessor?
~SyntaxOnlyAction() override
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
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.
void ExecuteAction() override
Implement the ExecuteAction interface by running Sema on the already-initialized AST consumer.
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
bool hasCodeCompletionSupport() const override
Does this action support use with code completion?
void ExecuteAction() override
Implement the ExecuteAction interface by running Sema on the already-initialized AST consumer.
The JSON file list parser is used to communicate input to InstallAPI.
TranslationUnitKind
Describes the kind of translation unit being processed.
@ TU_Complete
The translation unit is a complete translation unit.
@ TU_ClangModule
The translation unit is a clang module.
@ TU_Prefix
The translation unit is a prefix to a translation unit, and is not complete.