[Mlir-commits] [mlir] [mlir] Add mlirTranslateModuleToLLVMIR to MLIR-C (PR #73117)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Wed Nov 22 06:17:54 PST 2023


================
@@ -0,0 +1,35 @@
+//===- LLVMIR.h - C Interface for MLIR LLVMIR Target -------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This header declares the C interface to target LLVMIR with MLIR.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef MLIR_C_TARGET_LLVMIR_H
+#define MLIR_C_TARGET_LLVMIR_H
+
+#include "mlir-c/IR.h"
+#include "mlir-c/Support.h"
+#include "llvm-c/Support.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Translate operation that satisfies LLVM dialect module requirements into an
+// LLVM IR module living in the given context. This translates operations from
+// any dilalect that has a registered implementation of
+// LLVMTranslationDialectInterface.
----------------
ftynse wrote:

Nit: MLIR uses `///` for top-level documentation.

https://github.com/llvm/llvm-project/pull/73117


More information about the Mlir-commits mailing list