10 #ifndef LLVM_CLANG_CODEGEN_CODEGENACTION_H
11 #define LLVM_CLANG_CODEGEN_CODEGENACTION_H
22 class BackendConsumer;
27 std::unique_ptr<llvm::Module> TheModule;
31 llvm::LLVMContext *VMContext;
38 CodeGenAction(
unsigned _Act, llvm::LLVMContext *_VMContext =
nullptr);
43 StringRef InFile)
override;
56 LinkModules.push_back(std::make_pair(LinkFlags, Mod));
70 virtual void anchor();
76 virtual void anchor();
82 virtual void anchor();
88 virtual void anchor();
94 virtual void anchor();
100 virtual void anchor();
bool hasIRSupport() const override
Does this action support use with IR files?
void EndSourceFileAction() override
Callback at the end of processing a single input.
void ExecuteAction() override
Callback to run the program action, using the initialized compiler instance.
BackendConsumer * BEConsumer
EmitLLVMAction(llvm::LLVMContext *_VMContext=nullptr)
~CodeGenAction() override
CodeGenAction(unsigned _Act, llvm::LLVMContext *_VMContext=nullptr)
Create a new code generation action.
EmitObjAction(llvm::LLVMContext *_VMContext=nullptr)
EmitBCAction(llvm::LLVMContext *_VMContext=nullptr)
EmitCodeGenOnlyAction(llvm::LLVMContext *_VMContext=nullptr)
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
Abstract base class to use for AST consumer-based frontend actions.
EmitLLVMOnlyAction(llvm::LLVMContext *_VMContext=nullptr)
std::unique_ptr< llvm::Module > takeModule()
Take the generated LLVM module, for use after the action has been run.
void addLinkModule(llvm::Module *Mod, unsigned LinkFlags)
setLinkModule - Set the link module to be used by this action.
std::unique_ptr< ASTConsumer > CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override
Create the AST consumer object for this action, if supported.
EmitAssemblyAction(llvm::LLVMContext *_VMContext=nullptr)
llvm::LLVMContext * takeLLVMContext()
Take the LLVM context used by this action.
Defines the clang::FrontendAction interface and various convenience abstract classes (clang::ASTFront...