[cfe-commits] r102849 - /cfe/trunk/lib/CodeGen/CGClass.cpp
Anders Carlsson
andersca at mac.com
Sat May 1 10:07:41 PDT 2010
Author: andersca
Date: Sat May 1 12:07:40 2010
New Revision: 102849
URL: http://llvm.org/viewvc/llvm-project?rev=102849&view=rev
Log:
Simplify EmitCopyCtorCall.
Modified:
cfe/trunk/lib/CodeGen/CGClass.cpp
Modified: cfe/trunk/lib/CodeGen/CGClass.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGClass.cpp?rev=102849&r1=102848&r2=102849&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGClass.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGClass.cpp Sat May 1 12:07:40 2010
@@ -356,23 +356,16 @@
/// EmitCopyCtorCall - Emit a call to a copy constructor.
static void
-EmitCopyCtorCall(CodeGenFunction &CGF,
- const CXXConstructorDecl *CopyCtor, CXXCtorType CopyCtorType,
- llvm::Value *ThisPtr, llvm::Value *VTT, llvm::Value *Src) {
- llvm::Value *Callee = CGF.CGM.GetAddrOfCXXConstructor(CopyCtor, CopyCtorType);
+EmitCopyCtorCall(CodeGenFunction &CGF, const CXXConstructorDecl *CopyCtor,
+ llvm::Value *ThisPtr, llvm::Value *Src) {
+ llvm::Value *Callee = CGF.CGM.GetAddrOfCXXConstructor(CopyCtor, Ctor_Complete);
CallArgList CallArgs;
// Push the this ptr.
CallArgs.push_back(std::make_pair(RValue::get(ThisPtr),
CopyCtor->getThisType(CGF.getContext())));
-
- // Push the VTT parameter if necessary.
- if (VTT) {
- QualType T = CGF.getContext().getPointerType(CGF.getContext().VoidPtrTy);
- CallArgs.push_back(std::make_pair(RValue::get(VTT), T));
- }
-
+
// Push the Src ptr.
CallArgs.push_back(std::make_pair(RValue::get(Src),
CopyCtor->getParamDecl(0)->getType()));
@@ -593,7 +586,7 @@
CXXConstructorDecl *CopyCtor = ClassDecl->getCopyConstructor(getContext(), 0);
assert(CopyCtor && "Did not have copy ctor!");
- EmitCopyCtorCall(*this, CopyCtor, Ctor_Complete, Dest, 0, Src);
+ EmitCopyCtorCall(*this, CopyCtor, Dest, Src);
}
/// EmitClassCopyAssignment - This routine generates code to copy assign a class
More information about the cfe-commits
mailing list