2020-10-31 04:09:41 +08:00
|
|
|
// RUN: llvm-tblgen %s | FileCheck %s
|
2019-01-25 18:25:25 +08:00
|
|
|
// XFAIL: vg_leak
|
|
|
|
|
2020-10-31 04:09:41 +08:00
|
|
|
// Check that !cond works with an empty list value.
|
|
|
|
|
2019-01-25 18:25:25 +08:00
|
|
|
class C<bit cond> {
|
2020-10-31 04:09:41 +08:00
|
|
|
bit True = 1;
|
|
|
|
list<int> X = !cond(cond: [1, 2, 3], True : []);
|
|
|
|
list<int> Y = !cond(cond: [], True : [4, 5, 6]);
|
2019-01-25 18:25:25 +08:00
|
|
|
}
|
2020-10-31 04:09:41 +08:00
|
|
|
|
|
|
|
// 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>;
|