diff options
Diffstat (limited to 'src/llvm_backend.cpp')
| -rw-r--r-- | src/llvm_backend.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index 050bff9e3..1ee517dcd 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -2273,8 +2273,8 @@ lbValue lb_value_param(lbProcedure *p, Entity *e, Type *abi_type, i32 index, lbP if (e != nullptr && !are_types_identical(abi_type, e->type)) { if (is_type_pointer(abi_type)) { GB_ASSERT(e->kind == Entity_Variable); - Type *av = type_deref(abi_type); - if (are_types_identical(av, e->type)) { + Type *av = core_type(type_deref(abi_type)); + if (are_types_identical(av, core_type(e->type))) { kind = lbParamPass_Pointer; if (e->flags&EntityFlag_Value) { kind = lbParamPass_ConstRef; @@ -7041,8 +7041,8 @@ lbValue lb_emit_call(lbProcedure *p, lbValue value, Array<lbValue> const &args, array_add(&processed_args, args[i]); } else if (!are_types_identical(original_type, new_type)) { if (is_type_pointer(new_type) && !is_type_pointer(original_type)) { - Type *av = type_deref(new_type); - if (are_types_identical(av, arg_type)) { + Type *av = core_type(type_deref(new_type)); + if (are_types_identical(av, core_type(original_type))) { if (e->flags&EntityFlag_ImplicitReference) { array_add(&processed_args, lb_address_from_load_or_generate_local(p, args[i])); } else if (!is_type_pointer(arg_type)) { |