| 1 |
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s |
| 2 |
|
| 3 |
template <typename T> struct Quad2 { |
| 4 |
Quad2() {} |
| 5 |
}; |
| 6 |
|
| 7 |
typedef Quad2<double> Quad2d; |
| 8 |
|
| 9 |
@interface Root @end |
| 10 |
|
| 11 |
@interface PAGeometryFrame |
| 12 |
- (const Quad2d &)quad; |
| 13 |
- (void)setQuad:(const Quad2d &)quad; |
| 14 |
@end |
| 15 |
|
| 16 |
@interface PA2DScaleTransform : Root |
| 17 |
@end |
| 18 |
|
| 19 |
@implementation PA2DScaleTransform |
| 20 |
- (void)transformFrame:(PAGeometryFrame *)frame { |
| 21 |
PAGeometryFrame *result; |
| 22 |
result.quad = frame.quad; |
| 23 |
} |
| 24 |
@end |
| 25 |
|
| 26 |
// CHECK: [[SEL:%.*]] = load ptr, ptr @OBJC_SELECTOR_REFERENCES_, align 8, !invariant.load ![[MD_NUM:[0-9]+]] |
| 27 |
// CHECK: [[CALL:%.*]] = call noundef nonnull align 1 ptr @objc_msgSend(ptr noundef [[ONE:%.*]], ptr noundef [[SEL]]) |
| 28 |
// CHECK: [[SEL2:%.*]] = load ptr, ptr @OBJC_SELECTOR_REFERENCES_.2, align 8, !invariant.load ![[MD_NUM]] |
| 29 |
// CHECK: call void @objc_msgSend(ptr noundef [[ZERO:%.*]], ptr noundef [[SEL2]], ptr noundef nonnull align 1 [[CALL]]) |
| 30 |
|
| 31 |
|
| 32 |
struct A { |
| 33 |
void *ptr; |
| 34 |
A(); |
| 35 |
A(const A &); |
| 36 |
~A(); |
| 37 |
}; |
| 38 |
|
| 39 |
@interface C |
| 40 |
- (void) setProp: (const A&) value; |
| 41 |
@end |
| 42 |
void test(C *c, const A &a) { |
| 43 |
const A &result = c.prop = a; |
| 44 |
} |
| 45 |
|
| 46 |
// CHECK: [[ONE1:%.*]] = load ptr, ptr [[AADDR:%.*]], align 8 |
| 47 |
// CHECK: [[SEL3:%.*]] = load ptr, ptr @OBJC_SELECTOR_REFERENCES_.5, align 8, !invariant.load ![[MD_NUM]] |
| 48 |
// CHECK: call void @objc_msgSend(ptr noundef [[ZERO1:%.*]], ptr noundef [[SEL3]], ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[ONE1]]) |
| 49 |
// CHECK: store ptr [[ONE1]], ptr [[RESULT:%.*]], align 8 |