X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FTableGen%2FMultiClassInherit.td;h=9da80bad2d74ab34372b0eb41c69dffcb2a21967;hb=e5104ac99aae21fb8ee514f3b65eac9856399dc0;hp=5a1fc7ee405ce874a1b9f663ab4c88cea2888bbd;hpb=de444af6bb9a8a7bb95e2a274d8fa8697e8f4e3f;p=oota-llvm.git diff --git a/test/TableGen/MultiClassInherit.td b/test/TableGen/MultiClassInherit.td index 5a1fc7ee405..9da80bad2d7 100644 --- a/test/TableGen/MultiClassInherit.td +++ b/test/TableGen/MultiClassInherit.td @@ -1,4 +1,5 @@ -// RUN: tblgen %s | grep {zing = 4} | count 4 +// RUN: tblgen %s | grep {zing = 4} | count 28 +// XFAIL: vg_leak class C1 { int bar = A; @@ -8,25 +9,57 @@ class C1 { def T : C1<4, "blah">; -multiclass t { - def S1 : C1 { +multiclass t1 { + def S1 : C1 { int foo = 4; let bar = 1; } - def S2 : C1; + def S2 : C1; } -multiclass s : t { - def S3 : C1 { +multiclass t2 { + def S3 : C1 { + int foo = 4; + let bar = 1; + } + def S4 : C1; +} + +multiclass s1 : t1 { + def S5 : C1 { int moo = 3; let bar = 1; } - def S4 : C1; + def S6 : C1; } -defm FOO : s<42, 24>; +multiclass s2 : t1, t2; + +multiclass s3 : t1, t2 { + def S7 : C1 { + int moo = 3; + let bar = 1; + } + def S8 : C1; +} + +let zing = 4 in +defm FOO1 : s1<42, 24>; + +let zing = 4 in +defm FOO2 : s2<99>; + +let zing = 4 in +defm FOO3 : s3<84, 48>; def T4 : C1<6, "foo">; let zing = 4 in - defm BAZ : s<3, 4>; + defm BAZ1 : s1<3, 4>; + +let zing = 4 in + defm BAZ2 : s2<5>; + +let zing = 4 in + defm BAZ3 : s3<6, 7>; +