From de1d26b9c1d8823b173e4d77015ad88b4da70559 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Mon, 14 Sep 2009 05:32:02 +0000 Subject: Remove an unnecessary FunctionDecl parameter to the synthesizing functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81759 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/CodeGen/CodeGenFunction.cpp') diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index a3ce8a5958..0ed61bf0de 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -236,10 +236,10 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, if (const CompoundStmt *S = FD->getCompoundBody()) { StartFunction(GD, FD->getResultType(), Fn, Args, S->getLBracLoc()); if (const CXXConstructorDecl *CD = dyn_cast(FD)) - EmitCtorPrologue(CD); + EmitCtorPrologue(CD, GD.getCtorType()); EmitStmt(S); if (const CXXDestructorDecl *DD = dyn_cast(FD)) - EmitDtorEpilogue(DD); + EmitDtorEpilogue(DD, GD.getDtorType()); FinishFunction(S->getRBracLoc()); } else @@ -250,19 +250,19 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, if (CD->isCopyConstructor(getContext())) { assert(!ClassDecl->hasUserDeclaredCopyConstructor() && "bogus constructor is being synthesize"); - SynthesizeCXXCopyConstructor(GD, FD, Fn, Args); + SynthesizeCXXCopyConstructor(CD, GD.getCtorType(), Fn, Args); } else { assert(!ClassDecl->hasUserDeclaredConstructor() && "bogus constructor is being synthesize"); - SynthesizeDefaultConstructor(GD, FD, Fn, Args); + SynthesizeDefaultConstructor(CD, GD.getCtorType(), Fn, Args); } } - else if (isa(FD)) - SynthesizeDefaultDestructor(GD, FD, Fn, Args); + else if (const CXXDestructorDecl *CD = dyn_cast(FD)) + SynthesizeDefaultDestructor(CD, GD.getDtorType(), Fn, Args); else if (const CXXMethodDecl *MD = dyn_cast(FD)) { if (MD->isCopyAssignment()) - SynthesizeCXXCopyAssignment(MD, FD, Fn, Args); + SynthesizeCXXCopyAssignment(MD, Fn, Args); } // Destroy the 'this' declaration. -- cgit v1.2.3-18-g5258