1// RUN: llvm-tblgen %s | FileCheck %s 2// XFAIL: vg_leak 3 4// "zing = 4" x 28 5// CHECK: zing = 4 6// CHECK: zing = 4 7// CHECK: zing = 4 8// CHECK: zing = 4 9// CHECK: zing = 4 10// CHECK: zing = 4 11// CHECK: zing = 4 12// CHECK: zing = 4 13// CHECK: zing = 4 14// CHECK: zing = 4 15// CHECK: zing = 4 16// CHECK: zing = 4 17// CHECK: zing = 4 18// CHECK: zing = 4 19// CHECK: zing = 4 20// CHECK: zing = 4 21// CHECK: zing = 4 22// CHECK: zing = 4 23// CHECK: zing = 4 24// CHECK: zing = 4 25// CHECK: zing = 4 26// CHECK: zing = 4 27// CHECK: zing = 4 28// CHECK: zing = 4 29// CHECK: zing = 4 30// CHECK: zing = 4 31// CHECK: zing = 4 32// CHECK: zing = 4 33// CHECK-NOT: zing = 4 34 35class C1<int A, string B> { 36 int bar = A; 37 string thestr = B; 38 int zing; 39} 40 41def T : C1<4, "blah">; 42 43multiclass t1<int a1> { 44 def S1 : C1<a1, "foo"> { 45 int foo = 4; 46 let bar = 1; 47 } 48 def S2 : C1<a1, "bar">; 49} 50 51multiclass t2<int a2> { 52 def S3 : C1<a2, "foo"> { 53 int foo = 4; 54 let bar = 1; 55 } 56 def S4 : C1<a2, "bar">; 57} 58 59multiclass s1<int as1, int bs1> : t1<as1> { 60 def S5 : C1<bs1, "moo"> { 61 int moo = 3; 62 let bar = 1; 63 } 64 def S6 : C1<bs1, "baz">; 65} 66 67multiclass s2<int as2> : t1<as2>, t2<as2>; 68 69multiclass s3<int as3, int bs3> : t1<as3>, t2<as3> { 70 def S7 : C1<bs3, "moo"> { 71 int moo = 3; 72 let bar = 1; 73 } 74 def S8 : C1<bs3, "baz">; 75} 76 77let zing = 4 in 78defm FOO1 : s1<42, 24>; 79 80let zing = 4 in 81defm FOO2 : s2<99>; 82 83let zing = 4 in 84defm FOO3 : s3<84, 48>; 85 86def T4 : C1<6, "foo">; 87 88let zing = 4 in 89 defm BAZ1 : s1<3, 4>; 90 91let zing = 4 in 92 defm BAZ2 : s2<5>; 93 94let zing = 4 in 95 defm BAZ3 : s3<6, 7>; 96 97