xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenObjC/continuation-class.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -emit-llvm -o %t %s
2*f4a2713aSLionel Sambuc
3*f4a2713aSLionel Sambuc@interface Object
4*f4a2713aSLionel Sambuc- (id)new;
5*f4a2713aSLionel Sambuc@end
6*f4a2713aSLionel Sambuc
7*f4a2713aSLionel Sambuc@interface ReadOnly : Object
8*f4a2713aSLionel Sambuc{
9*f4a2713aSLionel Sambuc  int _object;
10*f4a2713aSLionel Sambuc  int _Anotherobject;
11*f4a2713aSLionel Sambuc}
12*f4a2713aSLionel Sambuc@property(readonly) int object;
13*f4a2713aSLionel Sambuc@property(readonly) int Anotherobject;
14*f4a2713aSLionel Sambuc@end
15*f4a2713aSLionel Sambuc
16*f4a2713aSLionel Sambuc@interface ReadOnly ()
17*f4a2713aSLionel Sambuc@property(readwrite) int object;
18*f4a2713aSLionel Sambuc@property(readwrite, setter = myAnotherobjectSetter:) int Anotherobject;
19*f4a2713aSLionel Sambuc@end
20*f4a2713aSLionel Sambuc
21*f4a2713aSLionel Sambuc@implementation ReadOnly
22*f4a2713aSLionel Sambuc@synthesize object = _object;
23*f4a2713aSLionel Sambuc@synthesize  Anotherobject = _Anotherobject;
24*f4a2713aSLionel Sambuc- (void) myAnotherobjectSetter : (int)val {
25*f4a2713aSLionel Sambuc    _Anotherobject = val;
26*f4a2713aSLionel Sambuc}
27*f4a2713aSLionel Sambuc@end
28*f4a2713aSLionel Sambuc
29*f4a2713aSLionel Sambucint main(int argc, char **argv) {
30*f4a2713aSLionel Sambuc    ReadOnly *test = [ReadOnly new];
31*f4a2713aSLionel Sambuc    test.object = 12345;
32*f4a2713aSLionel Sambuc    test.Anotherobject = 200;
33*f4a2713aSLionel Sambuc    return test.object - 12345 + test.Anotherobject - 200;
34*f4a2713aSLionel Sambuc}
35*f4a2713aSLionel Sambuc
36