mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-16 12:53:14 +01:00
Fix for variadic functions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user