Change CodeGen to emit calls using (RValue,Type) list:
 - Add CodeGenFunction::EmitAnyExprToTemp
   o Like EmitAnyExpr, but emits aggregates to a temporary location if
     none is available. Seems like this should be simpler (even aside
     from using first class aggregates).

 - Killed CodeGenFunction::EmitCallArg (just append the pair)

 - Conversion of RValues to actual call arguments is now isolated in
   CodeGenFunction::EmitCall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55970 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index 3922ae6..26e8c5f 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -26,6 +26,7 @@
 #include <sstream>
 
 using namespace clang;
+using namespace CodeGen;
 
 namespace {
 
@@ -438,7 +439,7 @@
                                     const ObjCInterfaceDecl *Class,
                                     llvm::Value *Receiver,
                                     bool IsClassMessage,
-                                    const CallArgList &CallArgs) {
+                                    const CodeGen::CallArgList &CallArgs) {
   // Create and init a super structure; this is a (receiver, class)
   // pair we will pass to objc_msgSendSuper.
   llvm::Value *ObjCSuper = 
@@ -493,8 +494,9 @@
                                            bool IsSuper,
                                            const CallArgList &CallArgs) {
   CallArgList ActualArgs;
-  ActualArgs.push_back(std::make_pair(Arg0, Arg0Ty));
-  ActualArgs.push_back(std::make_pair(EmitSelector(CGF.Builder, Sel),
+  ActualArgs.push_back(std::make_pair(RValue::get(Arg0), Arg0Ty));
+  ActualArgs.push_back(std::make_pair(RValue::get(EmitSelector(CGF.Builder, 
+                                                               Sel)),
                                       CGF.getContext().getObjCSelType()));
   ActualArgs.insert(ActualArgs.end(), CallArgs.begin(), CallArgs.end());