diff options
author | Anders Carlsson <andersca@mac.com> | 2010-05-02 18:13:35 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-05-02 18:13:35 +0000 |
commit | 245820b9d941b9908bf9ad255971126896e579a3 (patch) | |
tree | 1b89c97baa17b38d4dc68e55c19fa63b44324e3b /clang/lib/CodeGen/CGClass.cpp | |
parent | 54eb4843b1971cfe9020fd5b45a609921b87646b (diff) | |
download | bcm5719-llvm-245820b9d941b9908bf9ad255971126896e579a3.tar.gz bcm5719-llvm-245820b9d941b9908bf9ad255971126896e579a3.zip |
Remove another unused function.
llvm-svn: 102871
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGClass.cpp | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index a057b87a195..0f1b015966f 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/lib/CodeGen/CGClass.cpp @@ -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 |