1// RUN: llvm-tblgen %s | FileCheck %s
2// RUN: not llvm-tblgen -DERROR %s 2>&1 | FileCheck --check-prefix=ERROR %s
3
4def op;
5def otherop;
6
7def test {
8  // CHECK: dag d = (? "hello":$world);
9  dag d = (? "hello":$world);
10
11  // CHECK: dag undefNeither = (op 1, 2);
12  dag undefNeither = !con((op 1), (op 2));
13  // CHECK: dag undefFirst = (op 1, 2);
14  dag undefFirst   = !con((?  1), (op 2));
15  // CHECK: dag undefSecond = (op 1, 2);
16  dag undefSecond  = !con((op 1), (?  2));
17  // CHECK: dag undefBoth = (? 1, 2);
18  dag undefBoth    = !con((?  1), (?  2));
19
20#ifdef ERROR
21  // ERROR: Concatenated Dag operators do not match: '(op 1)' vs. '(otherop 2)'
22  dag mismatch     = !con((op 1), (otherop 2));
23#endif
24}
25