Mercurial > hg > CbC > CbC_llvm
comparison llvm/test/TableGen/cond-empty-list-arg.td @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | 1d019706d866 |
children |
comparison
equal
deleted
inserted
replaced
173:0572611fdcc8 | 207:2e18cbf3894f |
---|---|
1 // RUN: llvm-tblgen %s | 1 // RUN: llvm-tblgen %s | FileCheck %s |
2 // XFAIL: vg_leak | 2 // XFAIL: vg_leak |
3 | 3 |
4 // Check that !cond works with an empty list value. | |
5 | |
4 class C<bit cond> { | 6 class C<bit cond> { |
5 bit true = 1; | 7 bit True = 1; |
6 list<int> X = !cond(cond: [1, 2, 3], true : []); | 8 list<int> X = !cond(cond: [1, 2, 3], True : []); |
7 list<int> Y = !cond(cond: [], true : [4, 5, 6]); | 9 list<int> Y = !cond(cond: [], True : [4, 5, 6]); |
8 } | 10 } |
11 | |
12 // CHECK: def rec1 | |
13 // CHECK: X = []; | |
14 // CHECK: Y = [4, 5, 6]; | |
15 | |
16 def rec1 : C<0>; | |
17 | |
18 // CHECK: def rec2 | |
19 // CHECK: X = [1, 2, 3]; | |
20 // CHECK: Y = []; | |
21 | |
22 def rec2 : C<1>; |