diff options
| author | gingerBill <bill@gingerbill.org> | 2020-06-22 21:03:57 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-06-22 21:03:57 +0100 |
| commit | a6edcf4f18ce7d546db29854a1f26377f72fef4c (patch) | |
| tree | c42e3f2b563133f15b9964d69f6c4ef743e189d1 /src/llvm_backend.cpp | |
| parent | 2a598aa061a05716b3076267d402a6bee0315be4 (diff) | |
Fix ABI typo bug; Add `pop_safe` and `pop_front_safe`
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)) { |