[cfe-commits] r126685 - in /cfe/trunk: lib/CodeGen/CGObjCMac.cpp test/CodeGenObjC/fpret.m test/CodeGenObjC/nonvararg-messaging-call.m test/CodeGenObjC/property-type-mismatch.m test/CodeGenObjC/property.m test/CodeGenObjC/variadic-sends.m test/CodeGenObjCXX/property-dot-reference.mm test/CodeGenObjCXX/property-object-conditional-exp.mm

Fariborz Jahanian fjahanian at apple.com
Mon Feb 28 13:19:34 PST 2011


Author: fjahanian
Date: Mon Feb 28 15:19:34 2011
New Revision: 126685

URL: http://llvm.org/viewvc/llvm-project?rev=126685&view=rev
Log:
Revert r126678.


Removed:
    cfe/trunk/test/CodeGenObjC/nonvararg-messaging-call.m
Modified:
    cfe/trunk/lib/CodeGen/CGObjCMac.cpp
    cfe/trunk/test/CodeGenObjC/fpret.m
    cfe/trunk/test/CodeGenObjC/property-type-mismatch.m
    cfe/trunk/test/CodeGenObjC/property.m
    cfe/trunk/test/CodeGenObjC/variadic-sends.m
    cfe/trunk/test/CodeGenObjCXX/property-dot-reference.mm
    cfe/trunk/test/CodeGenObjCXX/property-object-conditional-exp.mm

Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=126685&r1=126684&r2=126685&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Mon Feb 28 15:19:34 2011
@@ -183,7 +183,7 @@
     Params.push_back(SelectorPtrTy);
     return
       CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
-                                                        Params, false),
+                                                        Params, true),
                                 "objc_msgSend");
   }
 
@@ -194,7 +194,7 @@
     Params.push_back(SelectorPtrTy);
     return
       CGM.CreateRuntimeFunction(llvm::FunctionType::get(llvm::Type::getVoidTy(VMContext),
-                                                        Params, false),
+                                                        Params, true),
                                 "objc_msgSend_stret");
 
   }
@@ -209,7 +209,7 @@
       CGM.CreateRuntimeFunction(llvm::FunctionType::get(
                                              llvm::Type::getDoubleTy(VMContext),
                                                         Params,
-                                                        false),
+                                                        true),
                                 "objc_msgSend_fpret");
 
   }
@@ -221,7 +221,7 @@
     Params.push_back(SuperPtrTy);
     Params.push_back(SelectorPtrTy);
     return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
-                                                             Params, false),
+                                                             Params, true),
                                      SuperName);
   }
 
@@ -232,7 +232,7 @@
     Params.push_back(SuperPtrTy);
     Params.push_back(SelectorPtrTy);
     return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
-                                                             Params, false),
+                                                             Params, true),
                                      SuperName);
   }
 
@@ -245,7 +245,7 @@
     Params.push_back(SelectorPtrTy);
     return CGM.CreateRuntimeFunction(
       llvm::FunctionType::get(llvm::Type::getVoidTy(VMContext),
-                              Params, false),
+                              Params, true),
       "objc_msgSendSuper_stret");
   }
 
@@ -258,7 +258,7 @@
     Params.push_back(SelectorPtrTy);
     return CGM.CreateRuntimeFunction(
       llvm::FunctionType::get(llvm::Type::getVoidTy(VMContext),
-                              Params, false),
+                              Params, true),
       "objc_msgSendSuper2_stret");
   }
 
@@ -721,7 +721,7 @@
     Params.push_back(ObjectPtrTy);
     Params.push_back(MessageRefPtrTy);
     return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
-                                                             Params, false),
+                                                             Params, true),
                                      "objc_msgSend_fixup");
   }
 
@@ -731,7 +731,7 @@
     Params.push_back(ObjectPtrTy);
     Params.push_back(MessageRefPtrTy);
     return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
-                                                             Params, false),
+                                                             Params, true),
                                      "objc_msgSend_fpret_fixup");
   }
 
@@ -741,7 +741,7 @@
     Params.push_back(ObjectPtrTy);
     Params.push_back(MessageRefPtrTy);
     return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
-                                                             Params, false),
+                                                             Params, true),
                                      "objc_msgSend_stret_fixup");
   }
 
@@ -752,7 +752,7 @@
     Params.push_back(SuperPtrTy);
     Params.push_back(SuperMessageRefPtrTy);
     return  CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
-                                                              Params, false),
+                                                              Params, true),
                                       "objc_msgSendSuper2_fixup");
   }
 
@@ -763,7 +763,7 @@
     Params.push_back(SuperPtrTy);
     Params.push_back(SuperMessageRefPtrTy);
     return  CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
-                                                              Params, false),
+                                                              Params, true),
                                       "objc_msgSendSuper2_stret_fixup");
   }
 
@@ -5693,7 +5693,7 @@
                                                       FunctionType::ExtInfo());
   llvm::Value *Callee = CGF.Builder.CreateStructGEP(Arg1, 0);
   Callee = CGF.Builder.CreateLoad(Callee);
-  const llvm::FunctionType *FTy = Types.GetFunctionType(FnInfo1, false);
+  const llvm::FunctionType *FTy = Types.GetFunctionType(FnInfo1, true);
   Callee = CGF.Builder.CreateBitCast(Callee,
                                      llvm::PointerType::getUnqual(FTy));
   return CGF.EmitCall(FnInfo1, Callee, Return, ActualArgs);

Modified: cfe/trunk/test/CodeGenObjC/fpret.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/fpret.m?rev=126685&r1=126684&r2=126685&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/fpret.m (original)
+++ cfe/trunk/test/CodeGenObjC/fpret.m Mon Feb 28 15:19:34 2011
@@ -15,21 +15,21 @@
 
 
 // CHECK-X86_32: define void @t0()
-// CHECK-X86_32: call float bitcast (double (i8*, i8*)* @objc_msgSend_fpret to
-// CHECK-X86_32: call double @objc_msgSend_fpret(
-// CHECK-X86_32: call x86_fp80 bitcast (double (i8*, i8*)* @objc_msgSend_fpret to
+// CHECK-X86_32: call float bitcast {{.*}} @objc_msgSend_fpret to
+// CHECK-X86_32: call double {{.*}} @objc_msgSend_fpret(
+// CHECK-X86_32: call x86_fp80 bitcast {{.*}} @objc_msgSend_fpret to
 // CHECK-X86_32: }
 //
 // CHECK-X86_64: define void @t0()
-// CHECK-X86_64: call float bitcast (i8* (i8*, i8*)* @objc_msgSend to
-// CHECK-X86_64: call double bitcast (i8* (i8*, i8*)* @objc_msgSend to
-// CHECK-X86_64: call x86_fp80 bitcast (double (i8*, i8*)* @objc_msgSend_fpret to
+// CHECK-X86_64: call float bitcast {{.*}} @objc_msgSend to
+// CHECK-X86_64: call double bitcast {{.*}} @objc_msgSend to
+// CHECK-X86_64: call x86_fp80 bitcast {{.*}} @objc_msgSend_fpret to
 // CHECK-X86_64: }
 //
 // CHECK-ARMV7: define void @t0()
-// CHECK-ARMV7: call float bitcast (i8* (i8*, i8*)* @objc_msgSend to
-// CHECK-ARMV7: call double bitcast (i8* (i8*, i8*)* @objc_msgSend to
-// CHECK-ARMV7: call double bitcast (i8* (i8*, i8*)* @objc_msgSend to
+// CHECK-ARMV7: call float bitcast {{.*}} @objc_msgSend to
+// CHECK-ARMV7: call double bitcast {{.*}} @objc_msgSend to
+// CHECK-ARMV7: call double bitcast {{.*}} @objc_msgSend to
 // CHECK-ARMV7: }
 void t0() {
   [(A*)0 floatValue];

Removed: cfe/trunk/test/CodeGenObjC/nonvararg-messaging-call.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/nonvararg-messaging-call.m?rev=126684&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjC/nonvararg-messaging-call.m (original)
+++ cfe/trunk/test/CodeGenObjC/nonvararg-messaging-call.m (removed)
@@ -1,18 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10  -fobjc-nonfragile-abi  -emit-llvm -o - %s | FileCheck %s
-// rdar://9048030
-
- at interface Foo
-+(id)alloc;
--(id)init;
--(id)self;
--(id)retain;
--(void)release;
--(id)autorelease;
- at end
-
-void test(void)
-{
-	[[[[[[Foo alloc] init] retain] autorelease] self] release];
-}
-
-// CHECK-NOT: call i8* (i8*, i8*, ...)* @objc_msgSend

Modified: cfe/trunk/test/CodeGenObjC/property-type-mismatch.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/property-type-mismatch.m?rev=126685&r1=126684&r2=126685&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/property-type-mismatch.m (original)
+++ cfe/trunk/test/CodeGenObjC/property-type-mismatch.m Mon Feb 28 15:19:34 2011
@@ -10,8 +10,8 @@
   x.myfo++;
 }
 
-// CHECK: [[C1:%.*]] = call float bitcast (i8* (i8*, i8*)* @objc_msgSend
+// CHECK: [[C1:%.*]] = call float bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
 // CHECK: [[I:%.*]] = fadd float [[C1]], 1.000000e+00
 // CHECK: [[CONV:%.*]] = fptosi float [[I]] to i32
 // CHECK: [[T3:%.*]] = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_2"
-// CHECK:  call void bitcast (i8* (i8*, i8*)* @objc_msgSend
+// CHECK:  call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend

Modified: cfe/trunk/test/CodeGenObjC/property.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/property.m?rev=126685&r1=126684&r2=126685&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/property.m (original)
+++ cfe/trunk/test/CodeGenObjC/property.m Mon Feb 28 15:19:34 2011
@@ -60,21 +60,21 @@
   // CHECK:      [[BASE:%.*]] = call [[A:%.*]]* @test2_helper()
   // CHECK-NEXT: [[SEL:%.*]] = load i8**
   // CHECK-NEXT: [[BASETMP:%.*]] = bitcast [[A]]* [[BASE]] to i8*
-  // CHECK-NEXT: [[LD:%.*]] = call i32 bitcast (i8* (i8*, i8*)* @objc_msgSend to i32 (i8*, i8*)*)(i8* [[BASETMP]], i8* [[SEL]])
+  // CHECK-NEXT: [[LD:%.*]] = call i32 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i32 (i8*, i8*)*)(i8* [[BASETMP]], i8* [[SEL]])
   // CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[LD]], 1
   // CHECK-NEXT: [[SEL:%.*]] = load i8**
   // CHECK-NEXT: [[BASETMP:%.*]] = bitcast [[A]]* [[BASE]] to i8*
-  // CHECK-NEXT: call void bitcast (i8* (i8*, i8*)* @objc_msgSend to void (i8*, i8*, i32)*)(i8* [[BASETMP]], i8* [[SEL]], i32 [[ADD]])
+  // CHECK-NEXT: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i32)*)(i8* [[BASETMP]], i8* [[SEL]], i32 [[ADD]])
   test2_helper().dyn++;
 
   // CHECK:      [[BASE:%.*]] = call [[A]]* @test2_helper()
   // CHECK-NEXT: [[SEL:%.*]] = load i8**
   // CHECK-NEXT: [[BASETMP:%.*]] = bitcast [[A]]* [[BASE]] to i8*
-  // CHECK-NEXT: [[LD:%.*]] = call i32 bitcast (i8* (i8*, i8*)* @objc_msgSend to i32 (i8*, i8*)*)(i8* [[BASETMP]], i8* [[SEL]])
+  // CHECK-NEXT: [[LD:%.*]] = call i32 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i32 (i8*, i8*)*)(i8* [[BASETMP]], i8* [[SEL]])
   // CHECK-NEXT: [[ADD:%.*]] = mul nsw i32 [[LD]], 10
   // CHECK-NEXT: [[SEL:%.*]] = load i8**
   // CHECK-NEXT: [[BASETMP:%.*]] = bitcast [[A]]* [[BASE]] to i8*
-  // CHECK-NEXT: call void bitcast (i8* (i8*, i8*)* @objc_msgSend to void (i8*, i8*, i32)*)(i8* [[BASETMP]], i8* [[SEL]], i32 [[ADD]])
+  // CHECK-NEXT: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i32)*)(i8* [[BASETMP]], i8* [[SEL]], i32 [[ADD]])
   test2_helper().dyn *= 10;
 }
 

Modified: cfe/trunk/test/CodeGenObjC/variadic-sends.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/variadic-sends.m?rev=126685&r1=126684&r2=126685&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/variadic-sends.m (original)
+++ cfe/trunk/test/CodeGenObjC/variadic-sends.m Mon Feb 28 15:19:34 2011
@@ -8,33 +8,33 @@
 @end
 
 void f0(A *a) {
-  // CHECK-X86-32: call void bitcast (i8* (i8*, i8*)* @objc_msgSend to void (i8*, i8*)*)
-  // CHECK-X86-64: call void bitcast (i8* (i8*, i8*)* @objc_msgSend to void (i8*, i8*)*)
+  // CHECK-X86-32: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*)*)
+  // CHECK-X86-64: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*)*)
   [a im0];
 }
 
 void f1(A *a) {
-  // CHECK-X86-32: call void bitcast (i8* (i8*, i8*)* @objc_msgSend to void (i8*, i8*, i32)*)
-  // CHECK-X86-64: call void bitcast (i8* (i8*, i8*)* @objc_msgSend to void (i8*, i8*, i32)*)
+  // CHECK-X86-32: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i32)*)
+  // CHECK-X86-64: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i32)*)
   [a im1: 1];
 }
 
 void f2(A *a) {
-  // CHECK-X86-32: call void (i8*, i8*, i32, i32, ...)* bitcast (i8* (i8*, i8*)* @objc_msgSend to void (i8*, i8*, i32, i32, ...)*)
-  // CHECK-X86-64: call void (i8*, i8*, i32, i32, ...)* bitcast (i8* (i8*, i8*)* @objc_msgSend to void (i8*, i8*, i32, i32, ...)*)
+  // CHECK-X86-32: call void (i8*, i8*, i32, i32, ...)* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i32, i32, ...)*)
+  // CHECK-X86-64: call void (i8*, i8*, i32, i32, ...)* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i32, i32, ...)*)
   [a im2: 1, 2];
 }
 
 @interface B : A @end
 @implementation B : A
 -(void) foo {
-  // CHECK-X86-32: call void bitcast (i8* (%struct._objc_method_description*, i8*)* @objc_msgSendSuper to void (%struct._objc_method_description*, i8*, i32)*)
-  // CHECK-X86-64: call void bitcast (i8* (%struct._objc_method_description*, i8*)* @objc_msgSendSuper to void (%struct._objc_method_description*, i8*, i32)*)
+  // CHECK-X86-32: call void bitcast (i8* (%struct._objc_method_description*, i8*, ...)* @objc_msgSendSuper to void (%struct._objc_method_description*, i8*, i32)*)
+  // CHECK-X86-64: call void bitcast (i8* (%struct._objc_method_description*, i8*, ...)* @objc_msgSendSuper to void (%struct._objc_method_description*, i8*, i32)*)
   [super im1: 1];
 }
 -(void) bar {
-  // CHECK-X86-32: call void (%struct._objc_method_description*, i8*, i32, i32, ...)* bitcast (i8* (%struct._objc_method_description*, i8*)* @objc_msgSendSuper to void (%struct._objc_method_description*, i8*, i32, i32, ...)*)
-  // CHECK-X86-64: call void (%struct._objc_method_description*, i8*, i32, i32, ...)* bitcast (i8* (%struct._objc_method_description*, i8*)* @objc_msgSendSuper to void (%struct._objc_method_description*, i8*, i32, i32, ...)*)
+  // CHECK-X86-32: call void (%struct._objc_method_description*, i8*, i32, i32, ...)* bitcast (i8* (%struct._objc_method_description*, i8*, ...)* @objc_msgSendSuper to void (%struct._objc_method_description*, i8*, i32, i32, ...)*)
+  // CHECK-X86-64: call void (%struct._objc_method_description*, i8*, i32, i32, ...)* bitcast (i8* (%struct._objc_method_description*, i8*, ...)* @objc_msgSendSuper to void (%struct._objc_method_description*, i8*, i32, i32, ...)*)
   [super im2: 1, 2];
 }
 

Modified: cfe/trunk/test/CodeGenObjCXX/property-dot-reference.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/property-dot-reference.mm?rev=126685&r1=126684&r2=126685&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/property-dot-reference.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/property-dot-reference.mm Mon Feb 28 15:19:34 2011
@@ -11,7 +11,7 @@
 
 @implementation TNodeIconAndNameCell     
 - (const TFENode&) node {
-// CHECK: call %struct.TFENode* bitcast (i8* (i8*, i8*)* @objc_msgSend
+// CHECK: call %struct.TFENode* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
 // CHECK-NEXT: call void @_ZNK7TFENode6GetURLEv(%struct.TFENode* %{{.*}})
 	self.node.GetURL();
 }	// expected-warning {{control reaches end of non-void function}}
@@ -27,11 +27,11 @@
 - (const X&) target;
 @end
 void f1(A *a) {
-// CHECK: [[PRP:%.*]] = call %struct.X* bitcast (i8* (i8*, i8*)* @objc_msgSend
+// CHECK: [[PRP:%.*]] = call %struct.X* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
 // CHECK-NEXT:call void @_Z2f0RK1X(%struct.X* [[PRP]])
   f0(a.target);
 
-// CHECK: [[MSG:%.*]] = call %struct.X* bitcast (i8* (i8*, i8*)* @objc_msgSend
+// CHECK: [[MSG:%.*]] = call %struct.X* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
 // CHECK-NEXT:call void @_Z2f0RK1X(%struct.X* [[MSG]])
   f0([a target]);
 }

Modified: cfe/trunk/test/CodeGenObjCXX/property-object-conditional-exp.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/property-object-conditional-exp.mm?rev=126685&r1=126684&r2=126685&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/property-object-conditional-exp.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/property-object-conditional-exp.mm Mon Feb 28 15:19:34 2011
@@ -22,7 +22,7 @@
     CGRect dataRect;
     CGRect virtualBounds;
 
-// CHECK: [[SRC:%.*]] = call %struct.CGRect bitcast (i8* (i8*, i8*)* @objc_msgSend
+// CHECK: [[SRC:%.*]] = call %struct.CGRect bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
 // CHECK-NEXT:store %struct.CGRect [[SRC]], %struct.CGRect*
   dataRect = CGRectIsEmpty(virtualBounds) ? self.bounds : virtualBounds;
   dataRect = CGRectIsEmpty(virtualBounds) ? [self bounds] : virtualBounds;





More information about the cfe-commits mailing list