1// RUN: mlir-tblgen -gen-op-defs -op-shard-count=2 -I %S/../../include %s | FileCheck %s --check-prefix=DEFS 2// RUN: mlir-tblgen -gen-op-decls -op-shard-count=2 -I %S/../../include %s | FileCheck %s --check-prefix=DECLS 3 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: OpA 19// DECLS: OpB 20// DECLS: OpC 21// DECLS: registerTestDialectOperations( 22// DECLS: registerTestDialectOperations0( 23// DECLS: registerTestDialectOperations1( 24 25// DEFS-LABEL: GET_OP_DEFS_0 26// DEFS: void test::registerTestDialectOperations( 27// DEFS: void test::registerTestDialectOperations0( 28// DEFS: OpAAdaptor 29// DEFS: OpBAdaptor 30 31// DEFS-LABEL: GET_OP_DEFS_1 32// DEFS: void test::registerTestDialectOperations1( 33// DEFS: OpCAdaptor 34