]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
NRCALL now sets block->final and block->is_return
authorWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 19 Dec 2012 19:40:45 +0000 (20:40 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 19 Dec 2012 19:40:45 +0000 (20:40 +0100)
ir.c

diff --git a/ir.c b/ir.c
index 009cf764a7e26b04ce78df67fc28be4f3c19abe1..48cc067d29b9b89d60c08681fa42cc800bb8e177 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -1581,6 +1581,10 @@ ir_instr* ir_block_create_call(ir_block *self, lex_ctx ctx, const char *label, i
     in = ir_instr_new(ctx, self, (noreturn ? VINSTR_NRCALL : INSTR_CALL0));
     if (!in)
         return NULL;
+    if (noreturn) {
+        self->final = true;
+        self->is_return = true;
+    }
     out = ir_value_out(self->owner, label, (func->outtype == TYPE_VOID) ? store_return : store_value, func->outtype);
     if (!out) {
         ir_instr_delete(in);