Mercurial > projects > ldc
changeset 1407:9a049fd1a014
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.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Fri, 22 May 2009 00:19:54 +0200 |
parents | eb7cb41ee585 |
children | ecfec65d86cf |
files | gen/functions.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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;