150
|
1 // RUN: llvm-tblgen %s | FileCheck %s
|
|
2 // XFAIL: vg_leak
|
|
3
|
|
4 // CHECK: zing = 4
|
|
5 // CHECK: zing = 4
|
|
6 // CHECK: zing = 4
|
|
7 // CHECK: zing = 4
|
|
8 // CHECK-NOT: zing = 4
|
|
9
|
|
10 class C1<int A, string B> {
|
|
11 int bar = A;
|
|
12 string thestr = B;
|
|
13 int zing;
|
|
14 }
|
|
15
|
|
16 def T : C1<4, "blah">;
|
|
17
|
|
18 multiclass t<int a> {
|
|
19 def S1 : C1<a, "foo"> {
|
|
20 int foo = 4;
|
|
21 let bar = 1;
|
|
22 }
|
|
23 def S2 : C1<a, "bar">;
|
|
24 }
|
|
25
|
|
26 multiclass s<int a> {
|
|
27 def S3 : C1<a, "moo"> {
|
|
28 int moo = 3;
|
|
29 let bar = 1;
|
|
30 }
|
|
31 def S4 : C1<a, "baz">;
|
|
32 }
|
|
33
|
|
34 defm FOO : t<42>, s<24>;
|
|
35
|
|
36 def T4 : C1<6, "foo">;
|
|
37
|
|
38 let zing = 4 in
|
|
39 defm BAZ : t<3>, s<4>;
|