9#ifndef LLVM_CLANG_CIR_CIRGENACTION_H
10#define LLVM_CLANG_CIR_CIRGENACTION_H
14#include "llvm/ADT/SmallVector.h"
16#include "mlir/IR/BuiltinOps.h"
17#include "mlir/IR/OwningOpRef.h"
45 mlir::OwningOpRef<mlir::ModuleOp> MLIRMod;
47 mlir::MLIRContext *MLIRCtx;
49 std::unique_ptr<llvm::LLVMContext> Ctx;
61 std::unique_ptr<clang::ASTConsumer>
63 llvm::StringRef InFile)
override;
72 virtual void anchor();
79 virtual void anchor();
86 virtual void anchor();
93 virtual void anchor();
100 virtual void anchor();
107 virtual void anchor();
Defines the clang::FrontendAction interface and various convenience abstract classes (clang::ASTFront...
CIRGenAction(OutputType Action, mlir::MLIRContext *MLIRCtx=nullptr)
bool hasCIRSupport() const override
Does this action support use with CIR files?
void ExecuteAction() override
Implement the ExecuteAction interface by running Sema on the already-initialized AST consumer.
bool BeginSourceFileAction(clang::CompilerInstance &CI) override
Callback at the start of processing a single input.
std::unique_ptr< clang::ASTConsumer > CreateASTConsumer(clang::CompilerInstance &CI, llvm::StringRef InFile) override
friend class CIRGenConsumer
EmitAssemblyAction(mlir::MLIRContext *MLIRCtx=nullptr)
EmitBCAction(mlir::MLIRContext *MLIRCtx=nullptr)
EmitCIRAction(mlir::MLIRContext *MLIRCtx=nullptr)
EmitCIRBCAction(mlir::MLIRContext *MLIRCtx=nullptr)
EmitLLVMAction(mlir::MLIRContext *MLIRCtx=nullptr)
EmitObjAction(mlir::MLIRContext *MLIRCtx=nullptr)
Abstract base class to use for AST consumer-based frontend actions.
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
Diagnostic wrappers for TextAPI types for error reporting.