From cfba29002a60a96633e94ebd0cd5899e960d2dc0 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 11 Jan 2020 20:29:46 +0000 Subject: [PATCH] Add extra set_procedure_abi_types sanity checks in IR --- src/ir.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ir.cpp b/src/ir.cpp index 5af0e278c..2de2b2669 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -6141,6 +6141,9 @@ void ir_mangle_add_sub_type_name(irModule *m, Entity *field, String parent) { if (field->kind != Entity_TypeName) { return; } + if (is_type_proc(field->type)) { + set_procedure_abi_types(heap_allocator(), field->type); + } String cn = field->token.string; isize max_len = parent.len + 1 + 16 + 1 + cn.len; @@ -7413,6 +7416,7 @@ irValue *ir_build_expr_internal(irProcedure *proc, Ast *expr) { Type *proc_type_ = base_type(ir_type(value)); GB_ASSERT(proc_type_->kind == Type_Proc); TypeProc *pt = &proc_type_->Proc; + set_procedure_abi_types(heap_allocator(), proc_type_); if (is_call_expr_field_value(ce)) { auto args = array_make(ir_allocator(), pt->param_count);