Mercurial > hg > CbC > CbC_llvm
comparison mlir/test/mlir-tblgen/op-error.td @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | |
children | c4bab56944e8 |
comparison
equal
deleted
inserted
replaced
173:0572611fdcc8 | 207:2e18cbf3894f |
---|---|
1 // RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR1 %s 2>&1 | FileCheck --check-prefix=ERROR1 %s | |
2 // RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR2 %s 2>&1 | FileCheck --check-prefix=ERROR2 %s | |
3 // RUN: not mlir-tblgen -gen-op-decls -I %S/../../include -DERROR3 %s 2>&1 | FileCheck --check-prefix=ERROR3 %s | |
4 | |
5 include "mlir/IR/OpBase.td" | |
6 | |
7 def Test_Dialect : Dialect { | |
8 let name = "test_dialect"; | |
9 } | |
10 | |
11 #ifdef ERROR1 | |
12 // ERROR1: error: expected 'ins' | |
13 def OpInsMissing : Op<Test_Dialect, "ins_missing"> { | |
14 let builders = [ | |
15 OpBuilder<(outs)> | |
16 ]; | |
17 } | |
18 #endif | |
19 | |
20 #ifdef ERROR2 | |
21 // ERROR2: error: expected an argument with default value after other arguments with default values | |
22 def OpDefaultValueNotTrailing : Op<Test_Dialect, "default_value"> { | |
23 let builders = [ | |
24 OpBuilder<(ins CArg<"int", "42">, "int")> | |
25 ]; | |
26 } | |
27 #endif | |
28 | |
29 #ifdef ERROR3 | |
30 // ERROR3: error: expected an argument with default value after other arguments with default values | |
31 def OpDefaultValueNotTrailing : Op<Test_Dialect, "default_value"> { | |
32 let builders = [ | |
33 OpBuilder<(ins CArg<"int", "42">, CArg<"int">)> | |
34 ]; | |
35 } | |
36 #endif |