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:
Chris Lattner 2006-09-01 21:14:37 +00:00
parent 12069866c8
commit ef4e0c2827

View 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>;