aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-06-22 21:03:57 +0100
committergingerBill <bill@gingerbill.org>2020-06-22 21:03:57 +0100
commita6edcf4f18ce7d546db29854a1f26377f72fef4c (patch)
treec42e3f2b563133f15b9964d69f6c4ef743e189d1 /src/ir.cpp
parent2a598aa061a05716b3076267d402a6bee0315be4 (diff)
Fix ABI typo bug; Add `pop_safe` and `pop_front_safe`
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 2156a8102..021194b79 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -976,8 +976,8 @@ irValue *ir_value_param(irProcedure *parent, Entity *e, Type *abi_type, i32 inde
if (e != nullptr && 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))) {
v->Param.kind = irParamPass_Pointer;
if (e->flags&EntityFlag_Value) {
v->Param.kind = irParamPass_ConstRef;
@@ -3246,8 +3246,8 @@ irValue *ir_emit_call(irProcedure *p, irValue *value, Array<irValue *> const &ar
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, original_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, ir_address_from_load_or_generate_local(p, args[i]));
} else if (!is_type_pointer(arg_type)) {