10 #ifndef LLVM_CLANG_FRONTEND_FRONTENDACTIONS_H
11 #define LLVM_CLANG_FRONTEND_FRONTENDACTIONS_H
27 void ExecuteAction()
override;
30 StringRef InFile)
override;
45 StringRef InFile)
override;
51 StringRef InFile)
override;
57 StringRef InFile)
override;
63 StringRef InFile)
override;
69 StringRef InFile)
override;
75 StringRef InFile)
override;
90 static std::unique_ptr<raw_pwrite_stream>
92 std::string &Sysroot, std::string &OutputFile);
98 virtual std::unique_ptr<raw_pwrite_stream>
103 StringRef InFile)
override;
116 std::unique_ptr<raw_pwrite_stream>
124 std::unique_ptr<raw_pwrite_stream>
131 StringRef InFile)
override;
143 StringRef InFile)
override;
157 StringRef InFile)
override;
175 std::unique_ptr<FrontendAction> AdaptedAction;
178 std::vector<std::string> ASTFiles;
182 StringRef InFile)
override;
205 StringRef)
override {
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
bool shouldEraseOutputFiles() override
Callback at the end of processing a single input, to determine if the output files should be erased o...
bool hasPCHSupport() const override
Does this action support use with PCH?
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.
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
Abstract base class for actions which can be performed by the frontend.
The translation unit is a prefix to a translation unit, and is not complete.
static std::unique_ptr< raw_pwrite_stream > ComputeASTConsumerArguments(CompilerInstance &CI, StringRef InFile, std::string &Sysroot, std::string &OutputFile)
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.
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< 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.
bool hasPCHSupport() const override
Does this action support use with PCH?
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.
bool BeginSourceFileAction(CompilerInstance &CI) override
Callback at the start of processing a single input.
bool hasCodeCompletionSupport() const override
Does this action support use with code completion?
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.
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.
void ExecuteAction() override
Implement the ExecuteAction interface by running Sema on the already-initialized AST consumer...
ASTMergeAction(std::unique_ptr< FrontendAction > AdaptedAction, ArrayRef< std::string > ASTFiles)
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &, StringRef) override
Create the AST consumer object for this action, if supported.
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 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.
Frontend action adaptor that merges ASTs together.
void ExecuteAction() override
Callback to run the program action, using the initialized compiler instance.
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
~ASTMergeAction() override
bool hasASTFileSupport() const override
Does this action support use with AST files?
Abstract base class to use for AST consumer-based frontend actions.
Abstract base class to use for preprocessor-based frontend actions.
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.
void ExecuteAction() override
Callback to run the program action, using the initialized compiler instance.
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?
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.
void EndSourceFileAction() override
Callback at the end of processing a single input.
~SyntaxOnlyAction() override
void ExecuteAction() override
Callback to run the program action, using the initialized compiler instance.
TranslationUnitKind
Describes the kind of translation unit being processed.
bool usesPreprocessorOnly() const override
Does this action only use the preprocessor?
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.
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
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.
void ExecuteAction() override
Implement the ExecuteAction interface by running Sema on the already-initialized AST consumer...
The translation unit is a module.