34 lines · plain
1// RUN: mlir-tblgen -gen-op-defs -op-shard-count=2 -I %S/../../include %s | FileCheck %s --check-prefix=DEFS2// RUN: mlir-tblgen -gen-op-decls -op-shard-count=2 -I %S/../../include %s | FileCheck %s --check-prefix=DECLS3 4include "mlir/IR/OpBase.td"5 6def Test_Dialect : Dialect {7 let name = "test";8 let cppNamespace = "test";9}10 11class Test_Op<string mnemonic, list<Trait> traits = []> 12 : Op<Test_Dialect, mnemonic, traits>;13 14def OpA : Test_Op<"a">;15def OpB : Test_Op<"b">;16def OpC : Test_Op<"c">;17 18// DECLS: OpA19// DECLS: OpB20// DECLS: OpC21// DECLS: registerTestDialectOperations(22// DECLS: registerTestDialectOperations0(23// DECLS: registerTestDialectOperations1(24 25// DEFS-LABEL: GET_OP_DEFS_026// DEFS: void test::registerTestDialectOperations(27// DEFS: void test::registerTestDialectOperations0(28// DEFS: OpAAdaptor29// DEFS: OpBAdaptor30 31// DEFS-LABEL: GET_OP_DEFS_132// DEFS: void test::registerTestDialectOperations1(33// DEFS: OpCAdaptor34