mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
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:
parent
a6d442e651
commit
e5d5cdf2e9
18
test/TableGen/MultiDef.td
Normal file
18
test/TableGen/MultiDef.td
Normal 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
|
Loading…
Reference in New Issue
Block a user