Refactoring of copy ctor ir-gen. No change in functionality.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78489 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp
index 0a3d9d4..eae6161 100644
--- a/lib/CodeGen/CodeGenFunction.cpp
+++ b/lib/CodeGen/CodeGenFunction.cpp
@@ -246,9 +246,7 @@
if (CD->isCopyConstructor(getContext())) {
assert(!ClassDecl->hasUserDeclaredCopyConstructor() &&
"bogus constructor is being synthesize");
- StartFunction(FD, FD->getResultType(), Fn, Args, SourceLocation());
- EmitCopyCtorBody(CD, Args);
- FinishFunction();
+ SynthesizeCXXCopyConstructor(CD, FD, Fn, Args);
}
else {
assert(!ClassDecl->hasUserDeclaredConstructor() &&