Fix #49: Static arrays that don't fit in a register should be passed using byval

This commit is contained in:
Dan Sanduleac 2012-06-05 02:42:34 +01:00
parent d24592b3e7
commit 2748cdaa88
5 changed files with 12 additions and 6 deletions

View file

@ -162,6 +162,7 @@ llvm::FunctionType* DtoFunctionType(Type* type, Type* thistype, Type* nesttype,
else if (abi->passByVal(byref ? argtype->pointerTo() : argtype))
{
if (!byref) a |= llvm::Attribute::ByVal;
// set byref, because byval requires a pointed LLVM type
byref = true;
}
// sext/zext