Refactor handling of calls:
 - Added CodeGenFunction::EmitCall which just takes the callee, return
   type, and a list of (Value*,QualType) pairs.
 - Added CodeGenFunction::EmitCallArg which handles emitting code for
   a call argument and turning it into an appropriate
   (Value*,QualType) pair.
 - Changed Objective-C runtime interface so that the actual emission
   of arguments for message sends is (once again) done in the code to
   emit a message send.

No intended functionality change, this is prep work for better ABI
support and for Objective-C property setter support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55560 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp
index 624b24a..2a808f8 100644
--- a/lib/CodeGen/CGObjC.cpp
+++ b/lib/CodeGen/CGObjC.cpp
@@ -78,15 +78,21 @@
     Receiver = EmitScalarExpr(E->getReceiver());
   }
 
+  CallArgList Args;
+  for (CallExpr::const_arg_iterator i = E->arg_begin(), e = E->arg_end(); 
+       i != e; ++i)
+    EmitCallArg(*i, Args);
+  
   if (isSuperMessage) {
     // super is only valid in an Objective-C method
     const ObjCMethodDecl *OMD = cast<ObjCMethodDecl>(CurFuncDecl);
     return Runtime.GenerateMessageSendSuper(*this, E,
                                             OMD->getClassInterface(),
                                             Receiver,
-                                            isClassMessage);
+                                            isClassMessage,
+                                            Args);
   }
-  return Runtime.GenerateMessageSend(*this, E, Receiver, isClassMessage);
+  return Runtime.GenerateMessageSend(*this, E, Receiver, isClassMessage, Args);
 }
 
 /// StartObjCMethod - Begin emission of an ObjCMethod. This generates