diff --git a/mlir/include/mlir-c/IR.h b/mlir/include/mlir-c/IR.h --- a/mlir/include/mlir-c/IR.h +++ b/mlir/include/mlir-c/IR.h @@ -713,9 +713,7 @@ //===----------------------------------------------------------------------===// /// Checks whether a type id is null. -MLIR_CAPI_EXPORTED static inline bool mlirTypeIDIsNull(MlirTypeID typeID) { - return !typeID.ptr; -} +static inline bool mlirTypeIDIsNull(MlirTypeID typeID) { return !typeID.ptr; } /// Checks if two type ids are equal. MLIR_CAPI_EXPORTED bool mlirTypeIDEqual(MlirTypeID typeID1, MlirTypeID typeID2); diff --git a/mlir/lib/CAPI/IR/IR.cpp b/mlir/lib/CAPI/IR/IR.cpp --- a/mlir/lib/CAPI/IR/IR.cpp +++ b/mlir/lib/CAPI/IR/IR.cpp @@ -36,6 +36,8 @@ return wrap(context); } +bool mlirTypeIDIsNull(MlirTypeID typeID) { return !typeID.ptr; } + bool mlirContextEqual(MlirContext ctx1, MlirContext ctx2) { return unwrap(ctx1) == unwrap(ctx2); }