1 //===- Registration.cpp - C Interface for MLIR Registration ---------------===//
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/Registration.h"
10 
11 #include "mlir/CAPI/IR.h"
12 #include "mlir/InitAllDialects.h"
13 
mlirRegisterAllDialects(MlirContext context)14 void mlirRegisterAllDialects(MlirContext context) {
15   registerAllDialects(unwrap(context)->getDialectRegistry());
16   // TODO: we may not want to eagerly load here.
17   unwrap(context)->getDialectRegistry().loadAll(unwrap(context));
18 }
19