From abfa8945661f24006e4f8506c1ec2861569228ec Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 10 Oct 2019 20:52:07 +0100 Subject: Fix general IR parameter case --- src/check_type.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/check_type.cpp') diff --git a/src/check_type.cpp b/src/check_type.cpp index fe5825c47..89ee15666 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -2108,14 +2108,16 @@ Type *type_to_abi_compat_param_type(gbAllocator a, Type *original_type, ProcCall if (8*size > 16) { new_type = alloc_type_pointer(original_type); } else if (build_context.ODIN_ARCH == "amd64") { - // NOTE(bill): System V AMD64 ABI - if (bt->Struct.is_raw_union) { - // TODO(bill): Handle raw union correctly for - break; - } + if (is_type_struct(bt)) { + // NOTE(bill): System V AMD64 ABI + if (bt->Struct.is_raw_union) { + // TODO(bill): Handle raw union correctly for + break; + } - new_type = handle_struct_system_v_amd64_abi_type(bt); - return new_type; + new_type = handle_struct_system_v_amd64_abi_type(bt); + return new_type; + } } break; -- cgit v1.2.3