blob: 559b0b8c76a0f6deb83f0c2cff21ff8483d5ac73 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s &&
Fariborz Jahanian83bccb82009-01-20 20:04:12 +00002// RUN: grep -e "T@\\\22<X>\\\22" %t &&
3// RUN: grep -e "T@\\\22<X><Y>\\\22" %t &&
4// RUN: grep -e "T@\\\22<X><Y><Z>\\\22" %t &&
5// RUN: grep -e "T@\\\22Foo<X><Y><Z>\\\22" %t
6
7@protocol X, Y, Z;
8@class Foo;
9
10@protocol Proto
11@property (copy) id <X> x;
12@property (copy) id <X, Y> xy;
13@property (copy) id <X, Y, Z> xyz;
14@property(copy) Foo <X, Y, Z> *fooxyz;
15@end
16
17@interface Intf <Proto>
18{
19id <X> IVAR_x;
20id <X, Y> IVAR_xy;
21id <X, Y, Z> IVAR_xyz;
22Foo <X, Y, Z> *IVAR_Fooxyz;
23}
24@end
25
26@implementation Intf
27@dynamic x, xy, xyz, fooxyz;
28@end
29
30/**
31This protocol should generate the following metadata:
32struct objc_property_list __Protocol_Test_metadata = {
33 sizeof(struct objc_property), 4,
34 {
35 { "x", "T@\"<X>\"" },
36 { "xy", "T@\"<X><Y>\"" },
37 { "xyz", "T@\"<X><Y><Z>\"" },
38 { "fooxyz", "T@\"Foo<X><Y><Z>\"" }
39 }
40};
41
42"T@\"<X><Y><Z>\",D
43*/