blob: 1d726d4354a4d3f8b019a639d3f81e225b9983ee [file] [log] [blame]
Fariborz Jahanian842ddd02010-05-20 21:38:57 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s
2// RUN: grep objc_memmove_collectable %t | grep call | count 3
3// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s
4// RUN: grep objc_memmove_collectable %t | grep call | count 3
5
6static int count;
7
8typedef struct S {
9 int ii;
10} SS;
11
12struct type_s {
13 SS may_recurse;
14 id id_val;
15};
16
17@interface NamedObject
18{
19 struct type_s type_s_ivar;
20}
21- (void) setSome : (struct type_s) arg;
22- (struct type_s) getSome;
23@property(assign) struct type_s aggre_prop;
24@end
25
26@implementation NamedObject
27- (void) setSome : (struct type_s) arg
28 {
29 type_s_ivar = arg;
30 }
31- (struct type_s) getSome
32 {
33 return type_s_ivar;
34 }
35@synthesize aggre_prop = type_s_ivar;
36@end
37
38struct type_s some = {{1234}, (id)0};
39
40struct type_s get(void)
41{
42 return some;
43}
44
45void f(const struct type_s *in, struct type_s *out) {
46 *out = *in;
47}
48