aboutsummaryrefslogtreecommitdiff
path: root/src/ir_print.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-09-08 12:16:03 +0100
committergingerBill <bill@gingerbill.org>2018-09-08 12:16:03 +0100
commit3825eab989c0911326fd009b96c9768150ff6ac2 (patch)
treedf87565103ece81667b091dac69291071c962cca /src/ir_print.cpp
parent3cd6ae311df68c1ac8b4015ebf5eef694126a59b (diff)
Diverging procedures `proc() -> !` (no return)
Diffstat (limited to 'src/ir_print.cpp')
-rw-r--r--src/ir_print.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp
index 441835922..5c6a9cb0a 100644
--- a/src/ir_print.cpp
+++ b/src/ir_print.cpp
@@ -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) {