diff options
author | David Greene <greened@obbligato.org> | 2011-10-05 22:42:47 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2011-10-05 22:42:47 +0000 |
commit | e5d5cdf2e971e746b103bab8a5258469a716cacf (patch) | |
tree | dd2c1a5a1c43ac50a29fed685f4324e128e7a6c8 /test/TableGen | |
parent | a6d442e65179092542d161679414b1e4e063ec4d (diff) |
Add a Multidef Test
Add a simple test for multidefs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141234 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/TableGen')
-rw-r--r-- | test/TableGen/MultiDef.td | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/TableGen/MultiDef.td b/test/TableGen/MultiDef.td new file mode 100644 index 00000000000..3a91c2ef926 --- /dev/null +++ b/test/TableGen/MultiDef.td @@ -0,0 +1,18 @@ +// RUN: tblgen %s | FileCheck %s +// RUN: tblgen %s | FileCheck %s + +class Base<int i> { + int value = i; +} + +multiclass Multi<list<int> values> { + def ONE : Base<values[0]>; + def TWO : Base<values[1]>; + + multidef COUNT<values, int v, 2> : Base<v>; +} + +defm List : Multi<[1, 2, 3, 4, 5, 6]>; + +// CHECK: MD4.ListCOUNT +// CHECK: int value = 6 |