Fixed a ir-gen bug in synthesizing copy constructors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78570 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp
index c16ca36..55693d1 100644
--- a/lib/CodeGen/CGCXX.cpp
+++ b/lib/CodeGen/CGCXX.cpp
@@ -784,7 +784,7 @@
     
     // Push the Src ptr.
     CallArgs.push_back(std::make_pair(RValue::get(Src),
-                                      BaseCopyCtor->getThisType(getContext())));
+                       BaseCopyCtor->getParamDecl(0)->getType()));
     QualType ResultType = 
     BaseCopyCtor->getType()->getAsFunctionType()->getResultType();
     EmitCall(CGM.getTypes().getFunctionInfo(ResultType, CallArgs),