You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
937 B
26 lines
937 B
//===- StandardDialect.cpp - C Interface for Standard dialect -------------===//
|
|
//
|
|
// 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "mlir-c/StandardDialect.h"
|
|
#include "mlir-c/IR.h"
|
|
#include "mlir/CAPI/IR.h"
|
|
#include "mlir/CAPI/Support.h"
|
|
#include "mlir/Dialect/StandardOps/IR/Ops.h"
|
|
|
|
void mlirContextRegisterStandardDialect(MlirContext context) {
|
|
unwrap(context)->getDialectRegistry().insert<mlir::StandardOpsDialect>();
|
|
}
|
|
|
|
MlirDialect mlirContextLoadStandardDialect(MlirContext context) {
|
|
return wrap(unwrap(context)->getOrLoadDialect<mlir::StandardOpsDialect>());
|
|
}
|
|
|
|
MlirStringRef mlirStandardDialectGetNamespace() {
|
|
return wrap(mlir::StandardOpsDialect::getDialectNamespace());
|
|
}
|