Debian Codegraph @

clang/test/CodeGenObjC/atomic-aggregate-property.m

raw
1 // RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o - %s | FileCheck -check-prefix CHECK-LP64 %s
2 // RUN: %clang_cc1 -no-enable-noundef-analysis -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o - %s | FileCheck -check-prefix CHECK-LP64 %s
3
4 struct s {
5 double a, b, c, d;
6 };
7
8 struct s1 {
9 int i;
10 id j;
11 id k;
12 };
13
14 struct s2 {};
15
16 @interface A
17 @property (readwrite) double x;
18 @property (readwrite) struct s y;
19 @property (nonatomic, readwrite) struct s1 z;
20 @property (readwrite) struct s2 a;
21 @end
22
23 @implementation A
24 @synthesize x;
25 @synthesize y;
26 @synthesize z;
27 @synthesize a;
28 @end
29 // CHECK-LP64: define internal double @"\01-[A x]"(
30 // CHECK-LP64: load atomic i64, ptr {{%.*}} unordered, align 8
31
32 // CHECK-LP64: define internal void @"\01-[A setX:]"(
33 // CHECK-LP64: store atomic i64 {{%.*}}, ptr {{%.*}} unordered, align 8
34
35 // CHECK-LP64: define internal void @"\01-[A y]"(
36 // CHECK-LP64: call void @objc_copyStruct(ptr {{%.*}}, ptr {{%.*}}, i64 32, i1 zeroext true, i1 zeroext false)
37
38 // CHECK-LP64: define internal void @"\01-[A setY:]"(
39 // CHECK-LP64: call void @objc_copyStruct(ptr {{%.*}}, ptr {{%.*}}, i64 32, i1 zeroext true, i1 zeroext false)
40
41 // CHECK-LP64: define internal void @"\01-[A z]"(
42 // CHECK-LP64: call ptr @objc_memmove_collectable(
43
44 // CHECK-LP64: define internal void @"\01-[A setZ:]"(
45 // CHECK-LP64: call ptr @objc_memmove_collectable(
46
47 // CHECK-LP64: define internal void @"\01-[A a]"(
48 // (do nothing)
49
50 // CHECK-LP64: define internal void @"\01-[A setA:]"(
51 // (do nothing)