This patch fixes code gen. part of pr5333 (Conversion

using elipsis conversion).

llvm-svn: 86276
This commit is contained in:
Fariborz Jahanian 2009-11-06 18:47:57 +00:00
parent 8a6512961f
commit c2d71b531c
2 changed files with 27 additions and 1 deletions

View File

@ -649,8 +649,10 @@ void CodeGenModule::EmitCXXConstructor(const CXXConstructorDecl *D,
llvm::Function *
CodeGenModule::GetAddrOfCXXConstructor(const CXXConstructorDecl *D,
CXXCtorType Type) {
const FunctionProtoType *FPT = D->getType()->getAs<FunctionProtoType>();
const llvm::FunctionType *FTy =
getTypes().GetFunctionType(getTypes().getFunctionInfo(D), false);
getTypes().GetFunctionType(getTypes().getFunctionInfo(D),
FPT->isVariadic());
const char *Name = getMangledCXXCtorName(D, Type);
return cast<llvm::Function>(

View File

@ -0,0 +1,24 @@
// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -emit-llvm %s -o %t-64.ll &&
// RUN: FileCheck -check-prefix LPLL64 --input-file=%t-64.ll %s &&
// RUN: true
extern "C" int printf(...);
struct A {
A(...) {
printf("A::A(...)\n");
}
};
A a(1.34);
A b = 2.34;
int main()
{
A c[3];
}
// CHECK-LPLL64: call void (%struct.A*, ...)
// CHECK-LPLL64: call void (%struct.A*, ...)
// CHECK-LPLL64: call void (%struct.A*, ...)