1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
3 template <typename T> struct Quad2 {
7 typedef Quad2<double> Quad2d;
11 @interface PAGeometryFrame
12 - (const Quad2d &)quad;
13 - (void)setQuad:(const Quad2d &)quad;
16 @interface PA2DScaleTransform : Root
19 @implementation PA2DScaleTransform
20 - (void)transformFrame:(PAGeometryFrame *)frame {
21 PAGeometryFrame *result;
22 result.quad = frame.quad;
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]])
40 - (void) setProp: (const A&) value;
42 void test(C *c, const A &a) {
43 const A &result = c.prop = a;
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