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