]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
ast_call now passes AST_FLAG_NORETURN on to the IR
authorWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 19 Dec 2012 19:47:01 +0000 (20:47 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 19 Dec 2012 19:47:01 +0000 (20:47 +0100)
ast.c

diff --git a/ast.c b/ast.c
index fe7ea6a4518b577328748a889d2622056b64c52f..93d2a173f9c4a37686229c223e936ac38f7e94a8 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -2905,7 +2905,9 @@ bool ast_call_codegen(ast_call *self, ast_function *func, bool lvalue, ir_value
         vec_push(params, param);
     }
 
-    callinstr = ir_block_create_call(func->curblock, ast_ctx(self), ast_function_label(func, "call"), funval, false);
+    callinstr = ir_block_create_call(func->curblock, ast_ctx(self),
+                                     ast_function_label(func, "call"),
+                                     funval, !!(self->func->expression.flags & AST_FLAG_NORETURN));
     if (!callinstr)
         goto error;