diff options
Diffstat (limited to 'test/CodeGenObjCXX/property-objects.mm')
-rw-r--r-- | test/CodeGenObjCXX/property-objects.mm | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/test/CodeGenObjCXX/property-objects.mm b/test/CodeGenObjCXX/property-objects.mm index 6dfcc27f19..a3c2ed3746 100644 --- a/test/CodeGenObjCXX/property-objects.mm +++ b/test/CodeGenObjCXX/property-objects.mm @@ -1,8 +1,4 @@ // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s -// CHECK-NOT: callq _objc_msgSend_stret -// CHECK: call void @_ZN1SC1ERKS_ -// CHECK: call %class.S* @_ZN1SaSERKS_ -// CHECK: call %struct.CGRect* @_ZN6CGRectaSERKS_ class S { public: @@ -19,13 +15,14 @@ struct CGRect { S position; CGRect bounds; } + @property(assign, nonatomic) S position; @property CGRect bounds; @property CGRect frame; - (void)setFrame:(CGRect)frameRect; - (CGRect)frame; - (void) initWithOwner; -- (struct CGRect)extent; +- (CGRect)extent; - (void)dealloc; @end @@ -33,6 +30,11 @@ struct CGRect { @synthesize position; @synthesize bounds; @synthesize frame; + +// CHECK: define internal void @"\01-[I setPosition:]" +// CHECK: call %class.S* @_ZN1SaSERKS_ +// CHECK-NEXT: ret void + - (void)setFrame:(CGRect)frameRect {} - (CGRect)frame {return bounds;} @@ -42,14 +44,20 @@ struct CGRect { labelLayerFrame = self.bounds; _labelLayer.frame = labelLayerFrame; } + // rdar://8366604 - (void)dealloc { CGRect cgrect = self.extent; } - (struct CGRect)extent {return bounds;} + @end +// CHECK: define i32 @main +// CHECK: call void @_ZN1SC1ERKS_(%class.S* [[AGGTMP:%[a-zA-Z0-9\.]+]], %class.S* {{%[a-zA-Z0-9\.]+}}) +// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, %class.S*)*)(i8* {{%[a-zA-Z0-9\.]+}}, i8* {{%[a-zA-Z0-9\.]+}}, %class.S* [[AGGTMP]]) +// CHECK-NEXT: ret i32 0 int main() { I *i; S s1; @@ -59,7 +67,9 @@ int main() { // rdar://8379892 // CHECK: define void @_Z1fP1A -// CHECK: @objc_msgSend to void +// CHECK: call void @_ZN1XC1Ev(%struct.X* [[LVTEMP:%[a-zA-Z0-9\.]+]]) +// CHECK: call void @_ZN1XC1ERKS_(%struct.X* [[AGGTMP:%[a-zA-Z0-9\.]+]], %struct.X* [[LVTEMP]]) +// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, %struct.X*)*)({{.*}} %struct.X* [[AGGTMP]]) struct X { X(); X(const X&); |