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
This commit is contained in:
David Greene 2011-10-05 22:42:47 +00:00
parent a6d442e651
commit e5d5cdf2e9

18
test/TableGen/MultiDef.td Normal file
View File

@ -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