Default to C-style variadics for all calling conventions.

Fixes DMD testcase 'callingconv'.
This commit is contained in:
David Nadlinger
2012-09-27 23:53:04 +02:00
parent 3f9f13594c
commit e7c72b072b

View File

@@ -116,14 +116,11 @@ llvm::FunctionType* DtoFunctionType(Type* type, Type* thistype, Type* nesttype,
lidx++;
}
}
else if (f->linkage == LINKc)
{
fty.c_vararg = true;
}
else
{
type->error(0, "invalid linkage for variadic function");
fatal();
// Default to C-style varargs for non-extern(D) variadic functions.
// This seems to be what DMD does.
fty.c_vararg = true;
}
}