[Heikki Kultala] This patch contains the ABI changes for the TCE target.
[clang.git] / test / CodeGenObjCXX / property-object-conditional-exp.mm
blob826c351e79efa90e59d508227ee3ec7e8a2448f8
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
3 struct CGRect {
4   char* origin;
5   unsigned size;
6 };
7 typedef struct CGRect CGRect;
9 extern "C" bool CGRectIsEmpty(CGRect);
11 @interface Foo {
12   CGRect out;
14 @property CGRect bounds;
15 - (CGRect) out;
16 @end
19 @implementation Foo
21 - (void)bar {
22     CGRect dataRect;
23     CGRect virtualBounds;
25 // CHECK: [[SRC:%.*]] = call %struct.CGRect bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
26 // CHECK-NEXT:store %struct.CGRect [[SRC]], %struct.CGRect*
27   dataRect = CGRectIsEmpty(virtualBounds) ? self.bounds : virtualBounds;
28   dataRect = CGRectIsEmpty(virtualBounds) ? [self bounds] : virtualBounds;
29   dataRect = CGRectIsEmpty(virtualBounds) ? virtualBounds : self.bounds;
31   dataRect = CGRectIsEmpty(virtualBounds) ? self.out : virtualBounds;
32   dataRect = CGRectIsEmpty(virtualBounds) ? [self out] : virtualBounds;
33   dataRect = CGRectIsEmpty(virtualBounds) ? virtualBounds : self.out;
36 @dynamic bounds;
37 - (CGRect) out { return out; }
38 @end