Fix incorrect handling of indirect returns in the ABI

This commit is contained in:
Christoffer Lerno
2021-07-11 13:47:04 +02:00
parent 2134a9f77b
commit 9614b9e31f

View File

@@ -270,7 +270,8 @@ LLVMTypeRef llvm_func_type(GenContext *context, Type *type)
UNREACHABLE;
case ABI_ARG_INDIRECT:
vec_add(params, llvm_get_ptr_type(context, real_return_type));
FALLTHROUGH;
return_type = llvm_get_type(context, type_void);
break;
case ABI_ARG_EXPAND_COERCE:
{
LLVMTypeRef lo = llvm_abi_type(context, ret_arg_info->direct_pair.lo);