xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenObjC/optimized-setter.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 %s -emit-llvm -fobjc-runtime=macosx-10.8 -triple x86_64-apple-macosx10.8.0 -o - | FileCheck %s
2*f4a2713aSLionel Sambuc// RUN: %clang_cc1 %s -emit-llvm -fobjc-runtime=ios-6.0.0  -triple x86_64-apple-ios6.0.0 -o - | FileCheck %s
3*f4a2713aSLionel Sambuc// RUN: %clang_cc1 %s -emit-llvm -fobjc-runtime=gnustep-1.7 -triple x86_64-unknown-freebsd -o - | FileCheck %s
4*f4a2713aSLionel Sambuc// rdar://10179974
5*f4a2713aSLionel Sambuc
6*f4a2713aSLionel Sambuc@interface I
7*f4a2713aSLionel Sambuc// void objc_setProperty_nonatomic(id self, SEL _cmd, id newValue, ptrdiff_t offset);
8*f4a2713aSLionel Sambuc// objc_setProperty(..., NO, NO)
9*f4a2713aSLionel Sambuc@property (nonatomic, retain) id nonatomicProperty;
10*f4a2713aSLionel Sambuc
11*f4a2713aSLionel Sambuc// void objc_setProperty_nonatomic_copy(id self, SEL _cmd, id newValue, ptrdiff_t offset);
12*f4a2713aSLionel Sambuc// objc_setProperty(..., NO, YES)
13*f4a2713aSLionel Sambuc@property (nonatomic, copy) id nonatomicPropertyCopy;
14*f4a2713aSLionel Sambuc
15*f4a2713aSLionel Sambuc// void objc_setProperty_atomic(id self, SEL _cmd, id newValue, ptrdiff_t offset);
16*f4a2713aSLionel Sambuc// objc_setProperty(..., YES, NO)
17*f4a2713aSLionel Sambuc@property (retain) id atomicProperty;
18*f4a2713aSLionel Sambuc
19*f4a2713aSLionel Sambuc// void objc_setProperty_atomic_copy(id self, SEL _cmd, id newValue, ptrdiff_t offset);
20*f4a2713aSLionel Sambuc// objc_setProperty(..., YES, YES)
21*f4a2713aSLionel Sambuc@property (copy) id atomicPropertyCopy;
22*f4a2713aSLionel Sambuc@end
23*f4a2713aSLionel Sambuc
24*f4a2713aSLionel Sambuc@implementation I
25*f4a2713aSLionel Sambuc@synthesize nonatomicProperty;
26*f4a2713aSLionel Sambuc@synthesize nonatomicPropertyCopy;
27*f4a2713aSLionel Sambuc@synthesize atomicProperty;
28*f4a2713aSLionel Sambuc@synthesize atomicPropertyCopy;
29*f4a2713aSLionel Sambuc@end
30*f4a2713aSLionel Sambuc
31*f4a2713aSLionel Sambuc// CHECK: call void @objc_setProperty_nonatomic
32*f4a2713aSLionel Sambuc// CHECK: call void @objc_setProperty_nonatomic_copy
33*f4a2713aSLionel Sambuc// CHECK: call void @objc_setProperty_atomic
34*f4a2713aSLionel Sambuc// CHECK: call void @objc_setProperty_atomic_copy
35*f4a2713aSLionel Sambuc
36