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/CGObjCRuntime.h b/lib/CodeGen/CGObjCRuntime.h
index e373ef2..54591a3 100644
--- a/lib/CodeGen/CGObjCRuntime.h
+++ b/lib/CodeGen/CGObjCRuntime.h
@@ -43,6 +43,8 @@
   class ObjCProtocolDecl;
   class Selector;
 
+  typedef llvm::SmallVector<std::pair<llvm::Value*, QualType>, 16> CallArgList;
+
 namespace CodeGen {
   class CodeGenModule;
 
@@ -81,7 +83,8 @@
   GenerateMessageSend(CodeGen::CodeGenFunction &CGF,
                       const ObjCMessageExpr *E,
                       llvm::Value *Receiver,
-                      bool IsClassMessage) = 0;
+                      bool IsClassMessage,
+                      const CallArgList &CallArgs) = 0;
 
   /// Generate an Objective-C message send operation to the super
   /// class initiated in a method for Class and with the given Self
@@ -91,7 +94,8 @@
                            const ObjCMessageExpr *E,
                            const ObjCInterfaceDecl *Class,
                            llvm::Value *Self,
-                           bool IsClassMessage) = 0;
+                           bool IsClassMessage,
+                           const CallArgList &CallArgs) = 0;
 
   /// Emit the code to return the named protocol as an object, as in a
   /// @protocol expression.
@@ -120,7 +124,7 @@
   /// return true, otherwise instance variables will be accessed directly from
   /// the structure.  If this returns true then @defs is invalid for this
   /// runtime and a warning should be generated.
-  virtual bool LateBoundIVars() { return false; }
+  virtual bool LateBoundIVars() const { return false; }
 };
 
 /// Creates an instance of an Objective-C runtime class.