MLIR  20.0.0git
IRDL.cpp
Go to the documentation of this file.
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"
13 
14 MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(IRDL, irdl, mlir::irdl::IRDLDialect)
15 
17  return wrap(mlir::irdl::loadDialects(unwrap(module)));
18 }
MlirLogicalResult mlirLoadIRDLDialects(MlirModule module)
Loads all IRDL dialects in the provided module, registering the dialects in the module's associated c...
Definition: IRDL.cpp:16
#define MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Name, Namespace, ClassName)
Definition: Registration.h:36
mlir::Diagnostic & unwrap(MlirDiagnostic diagnostic)
Definition: Diagnostics.h:19
MlirDiagnostic wrap(mlir::Diagnostic &diagnostic)
Definition: Diagnostics.h:24
llvm::LogicalResult loadDialects(ModuleOp op)
Load all the dialects defined in the module.
A logical result value, essentially a boolean with named states.
Definition: Support.h:116