Chandler Carruth | 4177e6f | 2012-07-02 12:47:22 +0000 | [diff] [blame] | 1 | // RUN: llvm-tblgen %s | grep "zing = 4" | count 4 |
Jeffrey Yasskin | 32989de | 2010-03-20 23:08:45 +0000 | [diff] [blame] | 2 | // XFAIL: vg_leak |
David Greene | 5654613 | 2009-04-22 22:17:51 +0000 | [diff] [blame] | 3 | |
4 | class C1<int A, string B> { | ||||
5 | int bar = A; | ||||
6 | string thestr = B; | ||||
7 | int zing; | ||||
8 | } | ||||
9 | |||||
10 | def T : C1<4, "blah">; | ||||
11 | |||||
12 | multiclass t<int a> { | ||||
13 | def S1 : C1<a, "foo"> { | ||||
14 | int foo = 4; | ||||
15 | let bar = 1; | ||||
16 | } | ||||
17 | def S2 : C1<a, "bar">; | ||||
18 | } | ||||
19 | |||||
20 | multiclass s<int a> { | ||||
21 | def S3 : C1<a, "moo"> { | ||||
22 | int moo = 3; | ||||
23 | let bar = 1; | ||||
24 | } | ||||
25 | def S4 : C1<a, "baz">; | ||||
26 | } | ||||
27 | |||||
28 | defm FOO : t<42>, s<24>; | ||||
29 | |||||
30 | def T4 : C1<6, "foo">; | ||||
31 | |||||
32 | let zing = 4 in | ||||
33 | defm BAZ : t<3>, s<4>; |