Debian Codegraph @

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

raw
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
2 // RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o - %s | FileCheck %s
3
4 typedef struct {
5 #ifdef __LP64__
6 unsigned char b[15];
7 #else
8 unsigned char b[7];
9 #endif
10 } bools_minus_one;
11
12 typedef struct {
13 #ifdef __LP64__
14 unsigned char b[16];
15 #else
16 unsigned char b[8];
17 #endif
18 } bools;
19
20
21 @interface Foo
22 {
23 #ifndef __LP64__
24 bools x;
25 bools_minus_one y;
26 #endif
27 }
28 @property(assign) bools bools_p;
29 @property(assign) bools_minus_one bools_minus_one_p;
30 @end
31
32 @implementation Foo
33 @synthesize bools_p=x;
34 @synthesize bools_minus_one_p=y;
35 @end
36
37 #ifdef __LP64__
38 typedef __int128_t dword;
39 #else
40 typedef long long int dword;
41 #endif
42
43 @interface Test_dwords
44 {
45 #ifndef __LP64__
46 dword dw;
47 #endif
48 }
49 @property(assign) dword dword_p;
50 @end
51
52 @implementation Test_dwords
53 @synthesize dword_p=dw;
54 @end
55
56
57 @interface Test_floats
58 {
59 float fl;
60 double d;
61 long double ld;
62 }
63 @property(assign) float fl_p;
64 @property(assign) double d_p;
65 @property(assign) long double ld_p;
66 @end
67
68 @implementation Test_floats
69 @synthesize fl_p = fl;
70 @synthesize d_p = d;
71 @synthesize ld_p = ld;
72 @end
73
74 // CHECK: call void @objc_copyStruct
75 // CHECK: call void @objc_copyStruct
76 // CHECK: call void @objc_copyStruct
77 // CHECK: call void @objc_copyStruct
78 // CHECK: call void @objc_copyStruct
79 // CHECK: call void @objc_copyStruct