blob: 7c235cb9b4ef7cb07f4b2a868922a92abf0d966a [file] [log] [blame]
Fariborz Jahanian68af13f2011-03-30 16:11:20 +00001// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
2// rdar://9208606
3
4struct MyStruct
5{
6 int x;
7 int y;
8 int z;
9};
10
11@interface MyClass
12{
13 MyStruct _foo;
14}
15
16@property (assign, readwrite) const MyStruct& foo;
17
18- (const MyStruct&) foo;
19- (void) setFoo:(const MyStruct&)inFoo;
20@end
21
22int main()
23{
24 MyClass* myClass;
25 MyStruct myStruct;
26
27 myClass.foo = myStruct;
28
29 const MyStruct& currentMyStruct = myClass.foo;
30 return 0;
31}
32
33// CHECK: [[C:%.*]] = call %struct.MyStruct* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
34// CHECK: store %struct.MyStruct* [[C]], %struct.MyStruct** [[D:%.*]]