1 // RUN: tblgen %s | grep {Jr} | count 2
2 // RUN: tblgen %s | grep {Sr} | count 2
3 // RUN: tblgen %s | grep {NAME} | count 1
6 // Variables for foreach
13 class A<list<string> names> {
14 list<string> Names = names;
17 class B<list<string> names> : A<!foreach(Decls.name, names, !strconcat(Decls.name, ", Sr."))>;
19 class C<list<string> names> : A<!foreach(Decls.name, names, !strconcat(Decls.name, ", Jr."))>;
21 class D<list<string> names> : A<!foreach(Decls.name, names, !subst("NAME", "John Smith", Decls.name))>;
24 list<string> values = ["Ken Griffey", "Seymour Cray"];
29 def Seniors : B<People.values>;
30 def Juniors : C<People.values>;
31 def Smiths : D<["NAME", "Jane Smith"]>;
32 def Unprocessed : D<People.values>;