blob: efe00022f51d0f8cc1ea0d94540caad43b6a1eeb [file] [log] [blame]
Chandler Carruth4177e6f2012-07-02 12:47:22 +00001// RUN: llvm-tblgen %s | grep ""
David Greene5f9f9ba2009-05-14 22:38:31 +00002
3class List<list<string> n> {
4 list<string> names = n;
5}
6
7class CAR<string e> {
8 string element = e;
9}
10
11class CDR<list<string> r, int n> {
12 list<string> rest = r;
13 int null = n;
14}
15
16class NameList<list<string> Names> :
David Greene1434f662011-01-07 17:05:37 +000017 List<Names>, CAR<!head(Names)>, CDR<!tail(Names), !empty(!tail(Names))>;
David Greene5f9f9ba2009-05-14 22:38:31 +000018
19def Three : NameList<["Tom", "Dick", "Harry"]>;
20
21def One : NameList<["Jeffrey Sinclair"]>;