diff options
Diffstat (limited to 'test/TableGen')
-rw-r--r-- | test/TableGen/listconcat.td | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/TableGen/listconcat.td b/test/TableGen/listconcat.td new file mode 100644 index 0000000000..870e649d41 --- /dev/null +++ b/test/TableGen/listconcat.td @@ -0,0 +1,18 @@ +// RUN: llvm-tblgen %s | FileCheck %s + +// CHECK: class Y<list<string> Y:S = ?> { +// CHECK: list<string> T1 = !listconcat(Y:S, ["foo"]); +// CHECK: list<string> T2 = !listconcat(Y:S, !listconcat(["foo"], !listconcat(Y:S, ["bar", "baz"]))); +// CHECK: } + +// CHECK: def Z { +// CHECK: list<string> T1 = ["fu", "foo"]; +// CHECK: list<string> T2 = ["fu", "foo", "fu", "bar", "baz"]; +// CHECK: } + +class Y<list<string> S> { + list<string> T1 = !listconcat(S, ["foo"]); + list<string> T2 = !listconcat(S, ["foo"], S, ["bar", "baz"]); +} + +def Z : Y<["fu"]>; |