Fixed a ir-gen bug in synthesizing copy constructors.

llvm-svn: 78570
This commit is contained in:
Fariborz Jahanian 2009-08-10 17:20:45 +00:00
parent b717091e69
commit 2a26e351fc
2 changed files with 3 additions and 6 deletions

View File

@ -784,7 +784,7 @@ void CodeGenFunction::EmitClassMemberwiseCopy(
// 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),

View File

@ -1,5 +1,5 @@
// RUNX: clang-cc -triple x86_64-apple-darwin -S %s -o %t-64.s &&
// RUNX: FileCheck -check-prefix LP64 --input-file=%t-64.s %s &&
// RUN: clang-cc -triple x86_64-apple-darwin -S %s -o %t-64.s &&
// RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s &&
// RUN: clang-cc -triple i386-apple-darwin -S %s -o %t-32.s &&
// RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s &&
// RUN: true
@ -43,12 +43,9 @@ int main()
X c(x);
c.pr();
}
#if 0
// -m64 does not work due to unrelated llvm bug!
// CHECK-LP64: .globl __ZN1XC1ERK1X
// CHECK-LP64: .weak_definition __ZN1XC1ERK1X
// CHECK-LP64: __ZN1XC1ERK1X:
#endif
// CHECK-LP32: .globl __ZN1XC1ERK1X
// CHECK-LP32: .weak_definition __ZN1XC1ERK1X