Add some tests of advanced TableGen list functionality.
authorDavid Greene <greened@obbligato.org>
Mon, 29 Jun 2009 20:07:17 +0000 (20:07 +0000)
committerDavid Greene <greened@obbligato.org>
Mon, 29 Jun 2009 20:07:17 +0000 (20:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74445 91177308-0d34-0410-b5e6-96231b3b80d8

test/TableGen/ListArgs.td [new file with mode: 0644]
test/TableGen/ListArgsSimple.td [new file with mode: 0644]

diff --git a/test/TableGen/ListArgs.td b/test/TableGen/ListArgs.td
new file mode 100644 (file)
index 0000000..daa0de6
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: tblgen %s
+
+class B<list<int> v> {
+  list<int> vals = v;
+}
+
+class BB<list<list<int>> vals> : B<vals[0]>;
+class BBB<list<list<int>> vals> : BB<vals>;
+
+def OneB : BBB<[[1,2,3]]>;
+def TwoB : BBB<[[1,2,3],[4,5,6]]>;
diff --git a/test/TableGen/ListArgsSimple.td b/test/TableGen/ListArgsSimple.td
new file mode 100644 (file)
index 0000000..b3b2078
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: tblgen %s
+
+class B<int v> {
+  int val = v;
+}
+
+class BB<list<int> vals> : B<vals[0]>;
+class BBB<list<int> vals> : BB<vals>;