Skip to content

Commit aae9e19

Browse files
committed
added basic filecheck for irdl translation
1 parent b1ccf66 commit aae9e19

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

mlir/test/lib/Dialect/TestIRDLToCpp/test_irdl_to_cpp.irdl.mlir

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,32 @@
1-
// RUN: mlir-irdl-to-cpp %s
1+
// RUN: mlir-irdl-to-cpp %s | FileCheck %s
22

3+
// CHECK: class TestIrdlToCpp
34
irdl.dialect @test_irdl_to_cpp {
5+
6+
// CHECK: class FooType
47
irdl.type @foo
58

9+
// CHECK: class BarOp
10+
// CHECK: ::mlir::Value getRes()
611
irdl.operation @bar {
712
%0 = irdl.any
813
irdl.results(res: %0)
914
}
1015

16+
// CHECK: class BeefOp
17+
// CHECK: ::mlir::Value getLhs()
18+
// CHECK: ::mlir::Value getRhs()
19+
// CHECK: ::mlir::Value getRes()
1120
irdl.operation @beef {
1221
%0 = irdl.any
1322
irdl.operands(lhs: %0, rhs: %0)
1423
irdl.results(res: %0)
1524
}
1625

26+
// CHECK: class HashOp
27+
// CHECK: ::mlir::Value getLhs()
28+
// CHECK: ::mlir::Value getRhs()
29+
// CHECK: ::mlir::Value getRes()
1730
irdl.operation @hash {
1831
%0 = irdl.any
1932
irdl.operands(lhs: %0, rhs: %0)

0 commit comments

Comments
 (0)