aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-10-31 18:25:39 +0000
committergingerBill <bill@gingerbill.org>2019-10-31 18:25:39 +0000
commitee8d3e03f89b1f8065fc9563d84830482bc3f387 (patch)
tree756f336baf179972c4cf689c9c61a8d9b4ff6db7 /src/ir.cpp
parent4aad45e3e7a500d6c86b0056ca5160c7d55ccc60 (diff)
Delay determination of procedure abi types until as late as possible to prevent type undetermination in self-referential data types #454
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index ae60be7e3..d4aecebf0 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -3038,6 +3038,7 @@ irValue *ir_emit_call(irProcedure *p, irValue *value, Array<irValue *> const &ar
context_ptr = ir_find_or_generate_context_ptr(p);
}
+ set_procedure_abi_types(heap_allocator(), pt);
bool is_c_vararg = pt->Proc.c_vararg;
isize param_count = pt->Proc.param_count;
@@ -10019,6 +10020,8 @@ void ir_insert_code_before_proc(irProcedure* proc, irProcedure *parent) {
void ir_build_proc(irValue *value, irProcedure *parent) {
irProcedure *proc = &value->Proc;
+ set_procedure_abi_types(heap_allocator(), proc->type);
+
proc->parent = parent;
if (proc->body != nullptr) {