diff options
| author | gingerBill <bill@gingerbill.org> | 2019-11-05 19:40:08 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-11-05 19:40:08 +0000 |
| commit | 8a46b493fda7cafa5320a9f2bfbd3c0317038545 (patch) | |
| tree | dde107194cb9dd7f979852d15508512f001bd129 /src/check_type.cpp | |
| parent | 86abdc060340469ba546e9c4db64453bf8b49d4f (diff) | |
Fix Slice passed incorrectly in LLVM IR to procedure called via procedure pointer #465
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index c733cfb4c..c0be3cbff 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -2407,6 +2407,19 @@ void set_procedure_abi_types(gbAllocator allocator, Type *type) { } } + for (i32 i = 0; i < type->Proc.param_count; i++) { + Entity *e = type->Proc.params->Tuple.variables[i]; + if (e->kind == Entity_Variable) { + set_procedure_abi_types(allocator, e->type); + } + } + for (i32 i = 0; i < type->Proc.result_count; i++) { + Entity *e = type->Proc.results->Tuple.variables[i]; + if (e->kind == Entity_Variable) { + set_procedure_abi_types(allocator, e->type); + } + } + // NOTE(bill): The types are the same type->Proc.abi_compat_result_type = type_to_abi_compat_result_type(allocator, type->Proc.results, type->Proc.calling_convention); type->Proc.return_by_pointer = abi_compat_return_by_pointer(allocator, type->Proc.calling_convention, type->Proc.abi_compat_result_type); |