[cfe-commits] r63691 - /cfe/trunk/lib/CodeGen/CGObjCMac.cpp

Fariborz Jahanian fjahanian at apple.com
Tue Feb 3 16:22:57 PST 2009


Author: fjahanian
Date: Tue Feb  3 18:22:57 2009
New Revision: 63691

URL: http://llvm.org/viewvc/llvm-project?rev=63691&view=rev
Log:
Some function stub added for new abi messaging.

Modified:
    cfe/trunk/lib/CodeGen/CGObjCMac.cpp

Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=63691&r1=63690&r2=63691&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Tue Feb  3 18:22:57 2009
@@ -641,7 +641,15 @@
   /// protocols. The return value has type ProtocolListPtrTy.
   llvm::Constant *EmitProtocolList(const std::string &Name,
                                    ObjCProtocolDecl::protocol_iterator begin,
-                                   ObjCProtocolDecl::protocol_iterator end);  
+                                   ObjCProtocolDecl::protocol_iterator end);
+  
+  CodeGen::RValue EmitMessageSend(CodeGen::CodeGenFunction &CGF,
+                                  QualType ResultType,
+                                  Selector Sel,
+                                  llvm::Value *Arg0,
+                                  QualType Arg0Ty,
+                                  bool IsSuper,
+                                  const CallArgList &CallArgs);
   
 public:
   CGObjCNonFragileABIMac(CodeGen::CodeGenModule &cgm);
@@ -653,8 +661,7 @@
                                               Selector Sel,
                                               llvm::Value *Receiver,
                                               bool IsClassMessage,
-                                              const CallArgList &CallArgs)
-    {return RValue::get(0);}
+                                              const CallArgList &CallArgs);
   
   virtual CodeGen::RValue 
   GenerateMessageSendSuper(CodeGen::CodeGenFunction &CGF,
@@ -4269,6 +4276,32 @@
   return LV;
 }
 
+CodeGen::RValue CGObjCNonFragileABIMac::EmitMessageSend(
+                                           CodeGen::CodeGenFunction &CGF,
+                                           QualType ResultType,
+                                           Selector Sel,
+                                           llvm::Value *Arg0,
+                                           QualType Arg0Ty,
+                                           bool IsSuper,
+                                           const CallArgList &CallArgs) {
+  return RValue::get(0);
+}
+
+/// Generate code for a message send expression in the nonfragile abi.
+CodeGen::RValue CGObjCNonFragileABIMac::GenerateMessageSend(
+                                               CodeGen::CodeGenFunction &CGF,
+                                               QualType ResultType,
+                                               Selector Sel,
+                                               llvm::Value *Receiver,
+                                               bool IsClassMessage,
+                                               const CallArgList &CallArgs) {
+  llvm::Value *Arg0 = 
+  CGF.Builder.CreateBitCast(Receiver, ObjCTypes.ObjectPtrTy, "tmp");
+  return EmitMessageSend(CGF, ResultType, Sel,
+                         Arg0, CGF.getContext().getObjCIdType(),
+                         false, CallArgs);
+}
+
 /* *** */
 
 CodeGen::CGObjCRuntime *





More information about the cfe-commits mailing list