| 1 |
// RUN: %clang_cc1 -x objective-c++ %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s |
| 2 |
|
| 3 |
struct TCPPObject |
| 4 |
{ |
| 5 |
TCPPObject(const TCPPObject& inObj); |
| 6 |
TCPPObject(); |
| 7 |
~TCPPObject(); |
| 8 |
int filler[64]; |
| 9 |
}; |
| 10 |
|
| 11 |
|
| 12 |
@interface MyDocument |
| 13 |
{ |
| 14 |
@private |
| 15 |
TCPPObject _cppObject; |
| 16 |
} |
| 17 |
@property (atomic, assign, readwrite) const TCPPObject& cppObject; |
| 18 |
@end |
| 19 |
|
| 20 |
@implementation MyDocument |
| 21 |
|
| 22 |
@synthesize cppObject = _cppObject; |
| 23 |
|
| 24 |
@end |
| 25 |
|
| 26 |
// CHECK: [[cppObjectaddr:%cppObject.addr]] = alloca ptr, align 8 |
| 27 |
// CHECK: store ptr [[cppObject:%.*]], ptr [[cppObjectaddr]], align 8 |
| 28 |
// CHECK: [[THREE:%.*]] = load ptr, ptr [[cppObjectaddr]], align 8 |
| 29 |
// CHECK: call void @objc_copyStruct(ptr noundef [[TWO:%.*]], ptr noundef [[THREE]], i64 noundef 256, i1 noundef zeroext true, i1 noundef zeroext false) |