aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-01-11 20:29:46 +0000
committergingerBill <bill@gingerbill.org>2020-01-11 20:29:46 +0000
commitcfba29002a60a96633e94ebd0cd5899e960d2dc0 (patch)
tree95948b5389af52193172a122e3804afe20b2d900 /src/ir.cpp
parent11c7b6a2e495ff300ea2b200d531dafae3486f90 (diff)
Add extra set_procedure_abi_types sanity checks in IR
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp4
1 files changed, 4 insertions, 0 deletions
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<irValue *>(ir_allocator(), pt->param_count);