9#ifndef LLVM_CLANG_INTERPRETER_INCREMENTALACTION_H
10#define LLVM_CLANG_INTERPRETER_INCREMENTALACTION_H
35 bool IsTerminating =
false;
38 std::unique_ptr<ASTConsumer> Consumer;
42 std::unique_ptr<llvm::Module> CachedInCodeGenModule;
47 std::unique_ptr<ASTConsumer> Consumer =
nullptr);
56 StringRef InFile)
override;
76 std::unique_ptr<llvm::Module>
GenModule();
The primary public interface to the Clang code generator.
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
Abstract base class for actions which can be performed by the frontend.
InProcessPrintingASTConsumer(std::unique_ptr< ASTConsumer > C, Interpreter &I)
bool HandleTopLevelDecl(DeclGroupRef DGR) override
HandleTopLevelDecl - Handle the specified top-level declaration.
llvm::Module * getCachedCodeGenModule() const
Access the cached CodeGen module.
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.
CodeGenerator * getCodeGen() const
Access the current code generator.
TranslationUnitKind getTranslationUnitKind() override
For AST-based actions, the kind of translation unit we're handling.
void CacheCodeGenModule()
Cache the current CodeGen module to preserve internal references.
IncrementalAction(CompilerInstance &Instance, llvm::LLVMContext &LLVMCtx, llvm::Error &Err, Interpreter &I, std::unique_ptr< ASTConsumer > Consumer=nullptr)
FrontendAction * getWrapped() const
void EndSourceFile() override
Perform any per-file post processing, deallocate per-file objects, and run statistics and output file...
std::unique_ptr< llvm::Module > GenModule()
Generate an LLVM module for the most recent parsed input.
Provides top-level interfaces for incremental compilation and execution.
MultiplexConsumer(std::vector< std::unique_ptr< ASTConsumer > > C)
WrapperFrontendAction(std::unique_ptr< FrontendAction > WrappedAction)
Construct a WrapperFrontendAction from an existing action, taking ownership of it.
std::unique_ptr< FrontendAction > WrappedAction
The JSON file list parser is used to communicate input to InstallAPI.
@ Module
Module linkage, which indicates that the entity can be referred to from other translation units withi...
TranslationUnitKind
Describes the kind of translation unit being processed.
@ TU_Incremental
The translation unit is a is a complete translation unit that we might incrementally extend later.
Diagnostic wrappers for TextAPI types for error reporting.