objc IRGen for Next runtime message API.
The prototype for objc_msgSend() is technically variadic - 
`id objc_msgSend(id, SEL, ...)`. 
But all method calls should use a prototype that matches the method, 
not the prototype for objc_msgSend itself().
// rdar://9048030


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126754 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenObjC/fpret.m b/test/CodeGenObjC/fpret.m
index 4884888..bde0caa 100644
--- a/test/CodeGenObjC/fpret.m
+++ b/test/CodeGenObjC/fpret.m
@@ -16,7 +16,7 @@
 
 // CHECK-X86_32: define void @t0()
 // CHECK-X86_32: call float bitcast {{.*}} @objc_msgSend_fpret to
-// CHECK-X86_32: call double {{.*}} @objc_msgSend_fpret(
+// CHECK-X86_32: call double bitcast {{.*}} @objc_msgSend_fpret to
 // CHECK-X86_32: call x86_fp80 bitcast {{.*}} @objc_msgSend_fpret to
 // CHECK-X86_32: }
 //
diff --git a/test/CodeGenObjC/messages.m b/test/CodeGenObjC/messages.m
index b36fe5b..449279c 100644
--- a/test/CodeGenObjC/messages.m
+++ b/test/CodeGenObjC/messages.m
@@ -13,8 +13,8 @@
   int i;
   MyPoint pt = { 1, 2};
 
-  // CHECK-MAC: call {{.*}} @objc_msgSend(
-  // CHECK-MAC-NF: call {{.*}} @objc_msgSend(
+  // CHECK-MAC: call {{.*}} @objc_msgSend to
+  // CHECK-MAC-NF: call {{.*}} @objc_msgSend to
   // CHECK-GNU: call {{.*}} @objc_msg_lookup(
   // CHECK-GNU-NF: call {{.*}} @objc_msg_lookup_sender(
   [a print0];
diff --git a/test/CodeGenObjC/no-vararg-messaging.m b/test/CodeGenObjC/no-vararg-messaging.m
new file mode 100644
index 0000000..f72820a
--- /dev/null
+++ b/test/CodeGenObjC/no-vararg-messaging.m
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10  -fobjc-nonfragile-abi  -S -o - %s | FileCheck %s
+// rdar://9048030
+
+@interface Foo
++(id)alloc;
+-(id)init;
+-(id)self;
+-(id)retain;
+-(void)release;
+-(id)autorelease;
+@end
+
+void test(void)
+{
+	[[[[[[Foo alloc] init] retain] autorelease] self] release];
+}
+
+// CHECK-NOT: xorb