Author: fjahanian
Date: Fri Jul 23 19:34:08 2010
New Revision: 109297
URL: http://llvm.org/viewvc/llvm-project?rev=109297&view=rev
Log:
Return type of a setter call caused by
use of property-dot syntax using 'super' as receiver
is 'void'. This fixes a bug in generating correct
API for setter call. Fixes radar 8203426.
Added:
cfe/trunk/test/CodeGenObjC/super-dotsyntax-struct-property.m
Modified:
cfe/trunk/lib/CodeGen/CGObjC.cpp
Modified: cfe/trunk/lib/CodeGen/CGObjC.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjC.cpp?rev=109297&r1=109296&r2=109297&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjC.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjC.cpp Fri Jul 23 19:34:08 2010
@@ -572,7 +572,7 @@
Args.push_back(std::make_pair(Src, Exp->getType()));
CGM.getObjCRuntime().GenerateMessageSendSuper(*this,
ReturnValueSlot(),
- Exp->getType(),
+ getContext().VoidTy,
S,
OMD->getClassInterface(),
isCategoryImpl,
Added: cfe/trunk/test/CodeGenObjC/super-dotsyntax-struct-property.m
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/super-dotsyntax-struct-property.m?rev=109297&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjC/super-dotsyntax-struct-property.m (added)
+++ cfe/trunk/test/CodeGenObjC/super-dotsyntax-struct-property.m Fri Jul 23
19:34:08 2010
@@ -0,0 +1,47 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi
-emit-llvm %s -o - | FileCheck %s
+// rdar: // 8203426
+
+
+typedef double CGFloat;
+struct CGPoint {
+ CGFloat x;
+ CGFloat y;
+};
+typedef struct CGPoint CGPoint;
+
+
+
+struct CGSize {
+ CGFloat width;
+ CGFloat height;
+};
+typedef struct CGSize CGSize;
+
+
+struct CGRect {
+ CGPoint origin;
+ CGSize size;
+};
+typedef struct CGRect CGRect;
+
+...@interface UIView {
+}
+...@property CGRect frame;
+...@end
+
+...@interface crashclass : UIView {
+
+}
+
+...@end
+
+...@implementation crashclass
+- (void)setFrame:(CGRect)frame
+{
+ super.frame = frame;
+ [super setFrame:frame];
+}
+
+...@end
+// CHECK-NOT: declare void @objc_msgSendSuper2_stret
+// CHECK: declare i8* @objc_msgSendSuper2
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits