Diverging procedures proc() -> ! (no return)

This commit is contained in:
gingerBill
2018-09-08 12:16:03 +01:00
parent 3cd6ae311d
commit 3825eab989
8 changed files with 37 additions and 6 deletions
+7
View File
@@ -1475,6 +1475,9 @@ void ir_print_instr(irFileBuffer *f, irModule *m, irValue *value) {
}
ir_write_str_lit(f, ")");
if (proc_type->Proc.no_return) {
ir_write_str_lit(f, " noreturn");
}
ir_print_debug_location(f, m, value, instr->block->proc);
break;
@@ -1624,6 +1627,10 @@ void ir_print_proc(irFileBuffer *f, irModule *m, irProcedure *proc) {
break;
}
if (proc_type->no_return) {
ir_write_str_lit(f, "noreturn ");
}
if (m->generate_debug_info && proc->entity != nullptr && proc->body != nullptr) {
irDebugInfo **di_ = map_get(&proc->module->debug_info, hash_pointer(proc->entity));
if (di_ != nullptr) {