[PM] Wire up support for printing assembly output from the opt command.
[oota-llvm.git] / test / TableGen / lisp.td
1 // RUN: llvm-tblgen %s
2 // XFAIL: vg_leak
3
4 // CHECK:      def One {
5 // CHECK-NEXT:   list<string> names = ["Jeffrey Sinclair"];
6 // CHECK-NEXT:   string element = "Jeffrey Sinclair";
7 // CHECK-NEXT:   list<string> rest = [];
8 // CHECK-NEXT:   int null = 1;
9 // CHECK-NEXT:   string NAME = ?;
10 // CHECK-NEXT: }
11 // CHECK-NEXT: def Three {
12 // CHECK-NEXT:   list<string> names = ["Tom", "Dick", "Harry"];
13 // CHECK-NEXT:   string element = "Tom";
14 // CHECK-NEXT:   list<string> rest = ["Dick", "Harry"];
15 // CHECK-NEXT:   int null = 0;
16 // CHECK-NEXT:   string NAME = ?;
17 // CHECK-NEXT: }
18
19 class List<list<string> n> {
20   list<string> names = n;
21 }
22
23 class CAR<string e> {
24   string element = e;
25 }
26
27 class CDR<list<string> r, int n> {
28   list<string> rest = r;
29   int null = n;
30 }
31
32 class NameList<list<string> Names> :
33   List<Names>, CAR<!head(Names)>, CDR<!tail(Names), !empty(!tail(Names))>;
34
35 def Three : NameList<["Tom", "Dick", "Harry"]>;
36
37 def One : NameList<["Jeffrey Sinclair"]>;