1 // RUN: mlir-pdll %s -I %S -I %S/../../../include -dump-ods 2>&1 | FileCheck %s
3 #include "include/ops.td"
5 // CHECK: Operation `test.all_empty` {
8 // CHECK: Operation `test.all_optional` {
9 // CHECK-NEXT: Attributes { attr : Optional<I64Attr> }
10 // CHECK-NEXT: Operands { operand : Optional<I64> }
11 // CHECK-NEXT: Results { result : Optional<I64> }
14 // CHECK: Operation `test.all_single` {
15 // CHECK-NEXT: Attributes { attr : I64Attr, nonNegativeAttr : I64Attr }
16 // CHECK-NEXT: Operands { operand : I64 }
17 // CHECK-NEXT: Results { result : I64 }
20 // CHECK: Operation `test.all_variadic` {
21 // CHECK-NEXT: Operands { operands : Variadic<I64> }
22 // CHECK-NEXT: Results { results : Variadic<I64> }
25 // CHECK: AttributeConstraint `I64Attr` {
26 // CHECK-NEXT: Summary: 64-bit signless integer attribute
27 // CHECK-NEXT: CppClass: ::mlir::IntegerAttr
30 // CHECK: TypeConstraint `I64` {
31 // CHECK-NEXT: Summary: 64-bit signless integer
32 // CHECK-NEXT: CppClass: ::mlir::IntegerType
35 // CHECK: UserConstraintDecl {{.*}} Name<TestAttrInterface> ResultType<Tuple<>> Code<return ::mlir::success((::llvm::isa<TestAttrInterface>(self)));>
37 // CHECK: `-VariableDecl {{.*}} Name<self> Type<Attr>
38 // CHECK: `Constraints`
39 // CHECK: `-AttrConstraintDecl
41 // CHECK: UserConstraintDecl {{.*}} Name<TestTypeInterface> ResultType<Tuple<>> Code<return ::mlir::success((::llvm::isa<TestTypeInterface>(self)));>
43 // CHECK: `-VariableDecl {{.*}} Name<self> Type<Type>
44 // CHECK: `Constraints`
45 // CHECK: `-TypeConstraintDecl {{.*}}
47 // CHECK: UserConstraintDecl {{.*}} Name<TestOpInterface> ResultType<Tuple<>> Code<return ::mlir::success(llvm::isa<::TestOpInterface>(self));>
49 // CHECK: `-VariableDecl {{.*}} Name<self> Type<Op>
50 // CHECK: `Constraints`
51 // CHECK: `-OpConstraintDecl
52 // CHECK: `-OpNameDecl