]> granicus.if.org Git - clang/commitdiff
Remove another unused function.
authorAnders Carlsson <andersca@mac.com>
Sun, 2 May 2010 18:13:35 +0000 (18:13 +0000)
committerAnders Carlsson <andersca@mac.com>
Sun, 2 May 2010 18:13:35 +0000 (18:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102871 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGClass.cpp
lib/CodeGen/CodeGenFunction.h

index a057b87a195f7baa5fdd867a3f2ff87ec364dec0..0f1b015966f11a6fcbeda54ae3052e5ff8deef1e 100644 (file)
@@ -506,42 +506,6 @@ void CodeGenFunction::EmitClassMemberwiseCopy(
   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
index 979fa4244b0e1f50dc406dd2e69151aac5794732..5ecc9a20c38d4d8a334eacb5f396cbbb56b6617b 100644 (file)
@@ -812,9 +812,6 @@ public:
   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);