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