[WinEH] Add some test cases I forgot to add to previous commits
[oota-llvm.git] / test / TableGen / lisp.td
1 // RUN: llvm-tblgen %s
2
3 // CHECK:      def One {
4 // CHECK-NEXT:   list<string> names = ["Jeffrey Sinclair"];
5 // CHECK-NEXT:   string element = "Jeffrey Sinclair";
6 // CHECK-NEXT:   list<string> rest = [];
7 // CHECK-NEXT:   int null = 1;
8 // CHECK-NEXT:   string NAME = ?;
9 // CHECK-NEXT: }
10 // CHECK-NEXT: def Three {
11 // CHECK-NEXT:   list<string> names = ["Tom", "Dick", "Harry"];
12 // CHECK-NEXT:   string element = "Tom";
13 // CHECK-NEXT:   list<string> rest = ["Dick", "Harry"];
14 // CHECK-NEXT:   int null = 0;
15 // CHECK-NEXT:   string NAME = ?;
16 // CHECK-NEXT: }
17
18 class List<list<string> n> {
19   list<string> names = n;
20 }
21
22 class CAR<string e> {
23   string element = e;
24 }
25
26 class CDR<list<string> r, int n> {
27   list<string> rest = r;
28   int null = n;
29 }
30
31 class NameList<list<string> Names> :
32   List<Names>, CAR<!head(Names)>, CDR<!tail(Names), !empty(!tail(Names))>;
33
34 def Three : NameList<["Tom", "Dick", "Harry"]>;
35
36 def One : NameList<["Jeffrey Sinclair"]>;