xref: /llvm-project/mlir/lib/CAPI/Dialect/IRDL.cpp (revision 1337622a492f4e77604b09ac8ff97042e46d8d42)
1 //===- IRDL.cpp - C Interface for IRDL dialect ----------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "mlir-c/Dialect/IRDL.h"
10 #include "mlir/CAPI/Registration.h"
11 #include "mlir/Dialect/IRDL/IR/IRDL.h"
12 #include "mlir/Dialect/IRDL/IRDLLoading.h"
13 
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(IRDL,irdl,mlir::irdl::IRDLDialect)14 MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(IRDL, irdl, mlir::irdl::IRDLDialect)
15 
16 MlirLogicalResult mlirLoadIRDLDialects(MlirModule module) {
17   return wrap(mlir::irdl::loadDialects(unwrap(module)));
18 }
19