Home | History | Annotate | Download | only in CodeGenObjCXX
      1 // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
      2 // rdar://9208606
      3 
      4 struct 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 
     22 int 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:%.*]]
     35