Mercurial > hg > CbC > CbC_llvm
diff 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 |
line wrap: on
line diff
--- a/llvm/test/TableGen/cond-empty-list-arg.td Mon May 25 11:55:54 2020 +0900 +++ b/llvm/test/TableGen/cond-empty-list-arg.td Tue Jun 08 06:07:14 2021 +0900 @@ -1,8 +1,22 @@ -// RUN: llvm-tblgen %s +// RUN: llvm-tblgen %s | FileCheck %s // XFAIL: vg_leak +// Check that !cond works with an empty list value. + class C<bit cond> { - bit true = 1; - list<int> X = !cond(cond: [1, 2, 3], true : []); - list<int> Y = !cond(cond: [], true : [4, 5, 6]); + bit True = 1; + list<int> X = !cond(cond: [1, 2, 3], True : []); + list<int> Y = !cond(cond: [], True : [4, 5, 6]); } + +// CHECK: def rec1 +// CHECK: X = []; +// CHECK: Y = [4, 5, 6]; + +def rec1 : C<0>; + +// CHECK: def rec2 +// CHECK: X = [1, 2, 3]; +// CHECK: Y = []; + +def rec2 : C<1>;