Fix for variadic functions

This commit is contained in:
Alexey Prokhin
2011-01-04 14:18:50 +03:00
parent ceac300df2
commit 67daf2fe0a

View File

@@ -117,6 +117,12 @@ const llvm::FunctionType* DtoFunctionType(Type* type, Type* thistype, Type* nest
lidx++;
}
}
#if DMDV2
else
{
fty.c_vararg = true;
}
#else
else if (f->linkage == LINKc)
{
fty.c_vararg = true;
@@ -126,6 +132,7 @@ const llvm::FunctionType* DtoFunctionType(Type* type, Type* thistype, Type* nest
type->error(0, "invalid linkage for variadic function");
fatal();
}
#endif
}
// if this _Dmain() doesn't have an argument, we force it to have one