summaryrefslogtreecommitdiff
path: root/test/TableGen
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2009-06-29 20:07:17 +0000
committerDavid Greene <greened@obbligato.org>2009-06-29 20:07:17 +0000
commitcf048d4e59bc7641330675755fae18030cdddb0e (patch)
tree51d6c1baf381984cf78ba06c105079d424888d3c /test/TableGen
parent2c0266202dc10a1ff887a8829950b6548d7feee3 (diff)
downloadllvm-cf048d4e59bc7641330675755fae18030cdddb0e.tar.gz
llvm-cf048d4e59bc7641330675755fae18030cdddb0e.tar.bz2
llvm-cf048d4e59bc7641330675755fae18030cdddb0e.tar.xz
Add some tests of advanced TableGen list functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74445 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/TableGen')
-rw-r--r--test/TableGen/ListArgs.td11
-rw-r--r--test/TableGen/ListArgsSimple.td8
2 files changed, 19 insertions, 0 deletions
diff --git a/test/TableGen/ListArgs.td b/test/TableGen/ListArgs.td
new file mode 100644
index 0000000000..daa0de66be
--- /dev/null
+++ b/test/TableGen/ListArgs.td
@@ -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
index 0000000000..b3b207825e
--- /dev/null
+++ b/test/TableGen/ListArgsSimple.td
@@ -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>;