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