diff options
Diffstat (limited to 'llvm/test/TableGen/size.td')
-rw-r--r-- | llvm/test/TableGen/size.td | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/llvm/test/TableGen/size.td b/llvm/test/TableGen/size.td new file mode 100644 index 00000000000..f7061e11079 --- /dev/null +++ b/llvm/test/TableGen/size.td @@ -0,0 +1,34 @@ +// RUN: llvm-tblgen %s | FileCheck %s +// XFAIL: vg_leak + +// CHECK: --- Defs --- + +// CHECK: def A1 { +// CHECK: int Val = 0; +// CHECK: } + +// CHECK: def A2 { +// CHECK: int Val = 3; +// CHECK: } + +// CHECK: def B1 { +// CHECK: int Val = 0; +// CHECK: } + +// CHECK: def B2 { +// CHECK: int Val = 2; +// CHECK: } + +class A<list<int> L> { + int Val = !size(L); +} + +class B<list<string> L> { + int Val = !size(L); +} + +def A1 : A<[]>; +def A2 : A<[1, 1, 2]>; + +def B1 : B<[]>; +def B2 : B<["a", "b"]>; |