1//===- IR.h - C API Utils for Core MLIR classes -----------------*- C++ -*-===//
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// This file contains declarations of implementation details of the C API for
10// core MLIR classes. This file should not be included from C++ code other than
11// C API implementation nor from C code.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef MLIR_CAPI_IR_H
16#define MLIR_CAPI_IR_H
17
18#include "mlir/Bytecode/BytecodeWriter.h"
19#include "mlir/CAPI/Wrap.h"
20#include "mlir/IR/BuiltinOps.h"
21#include "mlir/IR/MLIRContext.h"
22#include "mlir/IR/Operation.h"
23
24DEFINE_C_API_PTR_METHODS(MlirAsmState, mlir::AsmState)
25DEFINE_C_API_PTR_METHODS(MlirBytecodeWriterConfig, mlir::BytecodeWriterConfig)
26DEFINE_C_API_PTR_METHODS(MlirContext, mlir::MLIRContext)
27DEFINE_C_API_PTR_METHODS(MlirDialect, mlir::Dialect)
28DEFINE_C_API_PTR_METHODS(MlirDialectRegistry, mlir::DialectRegistry)
29DEFINE_C_API_PTR_METHODS(MlirOperation, mlir::Operation)
30DEFINE_C_API_PTR_METHODS(MlirBlock, mlir::Block)
31DEFINE_C_API_PTR_METHODS(MlirOpOperand, mlir::OpOperand)
32DEFINE_C_API_PTR_METHODS(MlirOpPrintingFlags, mlir::OpPrintingFlags)
33DEFINE_C_API_PTR_METHODS(MlirRegion, mlir::Region)
34DEFINE_C_API_PTR_METHODS(MlirSymbolTable, mlir::SymbolTable)
35
36DEFINE_C_API_METHODS(MlirAttribute, mlir::Attribute)
37DEFINE_C_API_METHODS(MlirIdentifier, mlir::StringAttr)
38DEFINE_C_API_METHODS(MlirLocation, mlir::Location)
39DEFINE_C_API_METHODS(MlirModule, mlir::ModuleOp)
40DEFINE_C_API_METHODS(MlirType, mlir::Type)
41DEFINE_C_API_METHODS(MlirValue, mlir::Value)
42
43#endif // MLIR_CAPI_IR_H
44

source code of mlir/include/mlir/CAPI/IR.h