[cfe-commits] r102871 - in /cfe/trunk/lib/CodeGen: CGClass.cpp CodeGenFunction.h

Anders Carlsson andersca at mac.com
Sun May 2 11:13:35 PDT 2010


Author: andersca
Date: Sun May  2 13:13:35 2010
New Revision: 102871

URL: http://llvm.org/viewvc/llvm-project?rev=102871&view=rev
Log:
Remove another unused function.

Modified:
    cfe/trunk/lib/CodeGen/CGClass.cpp
    cfe/trunk/lib/CodeGen/CodeGenFunction.h

Modified: cfe/trunk/lib/CodeGen/CGClass.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGClass.cpp?rev=102871&r1=102870&r2=102871&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGClass.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGClass.cpp Sun May  2 13:13:35 2010
@@ -506,42 +506,6 @@
   EmitCopyCtorCall(*this, CopyCtor, Dest, Src);
 }
 
-/// EmitClassCopyAssignment - This routine generates code to copy assign a class
-/// object from SrcValue to DestValue. Assignment can be either a bitwise
-/// assignment of via an assignment operator call.
-// FIXME. Consolidate this with EmitClassMemberwiseCopy as they share a lot.
-void 
-CodeGenFunction::EmitClassCopyAssignment(llvm::Value *Dest, llvm::Value *Src,
-                                         const CXXRecordDecl *ClassDecl) {
-  if (ClassDecl->hasTrivialCopyAssignment()) {
-    EmitAggregateCopy(Dest, Src, getContext().getTagDeclType(ClassDecl));
-    return;
-  }
-
-  const CXXMethodDecl *MD = 0;
-  ClassDecl->hasConstCopyAssignment(getContext(), MD);
-  assert(MD && "EmitClassCopyAssignment - missing copy assign");
-
-  const FunctionProtoType *FPT = MD->getType()->getAs<FunctionProtoType>();
-  const llvm::Type *LTy =
-    CGM.getTypes().GetFunctionType(CGM.getTypes().getFunctionInfo(MD),
-                                   FPT->isVariadic());
-  llvm::Constant *Callee = CGM.GetAddrOfFunction(MD, LTy);
-
-  CallArgList CallArgs;
-  // Push the this (Dest) ptr.
-  CallArgs.push_back(std::make_pair(RValue::get(Dest),
-                                    MD->getThisType(getContext())));
-
-  // Push the Src ptr.
-  QualType SrcTy = MD->getParamDecl(0)->getType();
-  RValue SrcValue = SrcTy->isReferenceType() ? RValue::get(Src) :
-                                               RValue::getAggregate(Src);
-  CallArgs.push_back(std::make_pair(SrcValue, SrcTy));
-  EmitCall(CGM.getTypes().getFunctionInfo(CallArgs, FPT),
-           Callee, ReturnValueSlot(), CallArgs, MD);
-}
-
 /// SynthesizeCXXCopyConstructor - This routine implicitly defines body of a
 /// copy constructor, in accordance with section 12.8 (p7 and p8) of C++03
 /// The implicitly-defined copy constructor for class X performs a memberwise

Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=102871&r1=102870&r2=102871&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Sun May  2 13:13:35 2010
@@ -812,9 +812,6 @@
   void EmitClassMemberwiseCopy(llvm::Value *DestValue, llvm::Value *SrcValue,
                                const CXXRecordDecl *ClassDecl);
 
-  void EmitClassCopyAssignment(llvm::Value *DestValue, llvm::Value *SrcValue,
-                               const CXXRecordDecl *ClassDecl);
-
   void EmitDelegateCXXConstructorCall(const CXXConstructorDecl *Ctor,
                                       CXXCtorType CtorType,
                                       const FunctionArgList &Args);





More information about the cfe-commits mailing list