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
10class C1<int A, string B> {
11  int bar = A;
12  string thestr = B;
13  int zing;
14}
15
16def T : C1<4, "blah">;
17
18multiclass 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
26multiclass 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
34defm FOO : t<42>, s<24>;
35
36def T4 : C1<6, "foo">;
37
38let zing = 4 in
39  defm BAZ : t<3>, s<4>;
40