mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-17 05:13:14 +01:00
Let TargetABI::passByValue() know when a parameter is byref (either explicitly
or because it's a static array) by giving it the pointer type instead of the type itself. This fixes Derelict compilation on x86-64, where the ABI wasn't expecting a static array to be passed in at all.
This commit is contained in:
@@ -145,7 +145,7 @@ const llvm::FunctionType* DtoFunctionType(Type* type, Type* thistype, Type* nest
|
||||
argtype = ltd;
|
||||
}
|
||||
// byval
|
||||
else if (abi->passByVal(argtype))
|
||||
else if (abi->passByVal(byref ? argtype->pointerTo() : argtype))
|
||||
{
|
||||
if (!byref) a |= llvm::Attribute::ByVal;
|
||||
byref = true;
|
||||
|
||||
Reference in New Issue
Block a user