aboutsummaryrefslogtreecommitdiff
path: root/test/TableGen
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2011-09-30 20:59:51 +0000
committerDavid Greene <greened@obbligato.org>2011-09-30 20:59:51 +0000
commitf6c8cbba4eae431ea52964205c80a57db498f268 (patch)
tree8ebc5ed9624c013e280194d49115927c9640289c /test/TableGen
parent1045a594e65c65c55dfcd9585658eee85ef79e75 (diff)
Test VarListElementInit:: resolveListElementReference
Add a TableGen test to check if indexing lists of lists works. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140883 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/TableGen')
-rw-r--r--test/TableGen/ListOfList.td13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/TableGen/ListOfList.td b/test/TableGen/ListOfList.td
new file mode 100644
index 0000000000..6fe0e89ed8
--- /dev/null
+++ b/test/TableGen/ListOfList.td
@@ -0,0 +1,13 @@
+// RUN tblgen %s | FileCheck %s
+
+// RUN: tblgen %s | grep {foo} | count 1
+
+class Base<string t> {
+ string text = t;
+}
+
+class Derived<list<list<string>> thetext> : Base<thetext[0][0]>;
+
+def FOO : Derived<[["foo"]]>;
+
+// CHECK: text = "foo"