# HG changeset patch # User Frits van Bommel # Date 1242944394 -7200 # Node ID 9a049fd1a0145c8a329a252b5dc3a4cb60c0c233 # Parent eb7cb41ee585431722295bcf916cb50230d02c35 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. diff -r eb7cb41ee585 -r 9a049fd1a014 gen/functions.cpp --- a/gen/functions.cpp Thu May 21 18:08:31 2009 +0200 +++ b/gen/functions.cpp Fri May 22 00:19:54 2009 +0200 @@ -145,7 +145,7 @@ argtype = ltd; } // byval - else if (abi->passByVal(argtype)) + else if (abi->passByVal(byref ? argtype->pointerTo() : argtype)) { if (!byref) a |= llvm::Attribute::ByVal; byref = true;