11 #include "llvm-c/Support.h"
13 #include "llvm/IR/LLVMContext.h"
14 #include "llvm/IR/Module.h"
25 LLVMContextRef context) {
30 std::unique_ptr<llvm::Module> llvmModule =
33 LLVMModuleRef moduleRef =
llvm::wrap(llvmModule.release());
LLVMModuleRef mlirTranslateModuleToLLVMIR(MlirOperation module, LLVMContextRef context)
Translate operation that satisfies LLVM dialect module requirements into an LLVM IR module living in ...
Operation is the basic unit of execution within MLIR.
mlir::Diagnostic & unwrap(MlirDiagnostic diagnostic)
MlirDiagnostic wrap(mlir::Diagnostic &diagnostic)
Include the generated interface declarations.
std::unique_ptr< llvm::Module > translateModuleToLLVMIR(Operation *module, llvm::LLVMContext &llvmContext, llvm::StringRef name="LLVMDialectModule", bool disableVerification=false)
Translates a given LLVM dialect module into an LLVM IR module living in the given context.