llvm-project
26 строк · 740.0 Байт
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o - %s | FileCheck %s
2
3@interface I
4{
5__weak id wObject;
6}
7@property (readwrite, weak) id representedObject;
8@property (readwrite, weak) id wObject;
9@property (readwrite, weak) __weak id wRandom;
10@property (readwrite, assign) __weak id wAnother;
11@end
12
13@implementation I
14@synthesize representedObject;
15@synthesize wObject;
16@synthesize wRandom;
17@synthesize wAnother;
18@end
19// CHECK: call ptr @objc_read_weak
20// CHECK: call ptr @objc_assign_weak
21// CHECK: call ptr @objc_read_weak
22// CHECK: call ptr @objc_assign_weak
23// CHECK: call ptr @objc_read_weak
24// CHECK: call ptr @objc_assign_weak
25// CHECK: call ptr @objc_read_weak
26// CHECK: call ptr @objc_assign_weak
27
28