blob: 025aca961cd55da1e9525f55d11a1b1a7ce15e19 [file] [log] [blame]
Peter Collingbourne5d5c0622011-10-06 13:39:59 +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"]>;