Chandler Carruth | 4177e6f | 2012-07-02 12:47:22 +0000 | [diff] [blame] | 1 | // RUN: llvm-tblgen %s | grep "" |
David Greene | 5f9f9ba | 2009-05-14 22:38:31 +0000 | [diff] [blame] | 2 | |
| 3 | class List<list<string> n> { |
| 4 | list<string> names = n; |
| 5 | } |
| 6 | |
| 7 | class CAR<string e> { |
| 8 | string element = e; |
| 9 | } |
| 10 | |
| 11 | class CDR<list<string> r, int n> { |
| 12 | list<string> rest = r; |
| 13 | int null = n; |
| 14 | } |
| 15 | |
| 16 | class NameList<list<string> Names> : |
David Greene | 1434f66 | 2011-01-07 17:05:37 +0000 | [diff] [blame] | 17 | List<Names>, CAR<!head(Names)>, CDR<!tail(Names), !empty(!tail(Names))>; |
David Greene | 5f9f9ba | 2009-05-14 22:38:31 +0000 | [diff] [blame] | 18 | |
| 19 | def Three : NameList<["Tom", "Dick", "Harry"]>; |
| 20 | |
| 21 | def One : NameList<["Jeffrey Sinclair"]>; |