forked from OSchip/llvm-project
parent
17410a4b92
commit
9d3405ceab
|
@ -791,7 +791,18 @@ void CodeGenFunction::EmitClassMemberwiseCopy(
|
|||
Callee, CallArgs, BaseCopyCtor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// SynthesizeDefaultConstructor - synthesize a default constructor
|
||||
void
|
||||
CodeGenFunction::SynthesizeDefaultConstructor(const CXXConstructorDecl *CD,
|
||||
const FunctionDecl *FD,
|
||||
llvm::Function *Fn,
|
||||
const FunctionArgList &Args) {
|
||||
StartFunction(FD, FD->getResultType(), Fn, Args, SourceLocation());
|
||||
EmitCtorPrologue(CD);
|
||||
FinishFunction();
|
||||
}
|
||||
|
||||
/// 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
|
||||
|
|
|
@ -251,9 +251,7 @@ void CodeGenFunction::GenerateCode(const FunctionDecl *FD,
|
|||
else {
|
||||
assert(!ClassDecl->hasUserDeclaredConstructor() &&
|
||||
"bogus constructor is being synthesize");
|
||||
StartFunction(FD, FD->getResultType(), Fn, Args, SourceLocation());
|
||||
EmitCtorPrologue(CD);
|
||||
FinishFunction();
|
||||
SynthesizeDefaultConstructor(CD, FD, Fn, Args);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -373,6 +373,10 @@ public:
|
|||
const FunctionDecl *FD,
|
||||
llvm::Function *Fn,
|
||||
const FunctionArgList &Args);
|
||||
void SynthesizeDefaultConstructor(const CXXConstructorDecl *CD,
|
||||
const FunctionDecl *FD,
|
||||
llvm::Function *Fn,
|
||||
const FunctionArgList &Args);
|
||||
|
||||
/// EmitDtorEpilogue - Emit all code that comes at the end of class's
|
||||
/// destructor. This is to call destructors on members and base classes
|
||||
|
|
Loading…
Reference in New Issue