1 // RUN: llvm-tblgen %s | FileCheck %s
12 // CHECK: list<string> x = ["0", "1", "2"];
16 // CHECK: list<int> y = [5, 7];
22 class A<list<string> names> {
23 list<string> Names = names;
26 class B<list<string> names> : A<!foreach(name, names, !strconcat(name, ", Sr."))>;
28 class C<list<string> names> : A<!foreach(name, names, !strconcat(name, ", Jr."))>;
30 class D<list<string> names> : A<!foreach(name, names, !subst("NAME", "John Smith", name))>;
33 list<string> values = ["Ken Griffey", "Seymour Cray"];
38 def Seniors : B<People.values>;
39 def Juniors : C<People.values>;
40 def Smiths : D<["NAME", "Jane Smith"]>;
41 def Unprocessed : D<People.values>;
43 class X<list<int> a> {
44 list<string> x = !foreach(num, a, !cast<string>(num));
47 def DX : X<[0, 1, 2]>;
49 class Y<list<int> a> {
50 list<int> y = !foreach(num, a, !add(!add(4, num), !add(1, num)));