mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-03 14:31:10 +00:00
simple multiclass example
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30028 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
12069866c8
commit
ef4e0c2827
17
test/TableGen/MultiClass.td
Normal file
17
test/TableGen/MultiClass.td
Normal file
@ -0,0 +1,17 @@
|
||||
// RUN: tblgen %s
|
||||
class C1<int A, string B> {
|
||||
int bar = A;
|
||||
string thestr = B;
|
||||
}
|
||||
|
||||
def T : C1<4, "blah">;
|
||||
|
||||
multiclass t<int a> {
|
||||
def S1 : C1<a, "foo"> {
|
||||
int foo = 4;
|
||||
let bar = 1;
|
||||
}
|
||||
def S2 : C1<a, "bar">;
|
||||
}
|
||||
|
||||
defm FOO : t<42>;
|
Loading…
x
Reference in New Issue
Block a user