From: Wolfgang Bumiller Date: Wed, 4 Jul 2012 13:00:30 +0000 (+0200) Subject: Storing ir_v for functions X-Git-Tag: 0.1-rc1~451 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=001420a7ef8e9bb5ab42668cbbd5d7bca4bb68bc;p=xonotic%2Fgmqcc.git Storing ir_v for functions --- diff --git a/ast.c b/ast.c index 4a54641..d22e239 100644 --- a/ast.c +++ b/ast.c @@ -491,8 +491,10 @@ bool ast_value_codegen(ast_value *self, ast_function *func, bool lvalue, ir_valu * and the ast-user should take care of ast_global_codegen to be used * on all the globals. */ - if (!self->ir_v) + if (!self->ir_v) { + printf("ast_value used before generated (%s)\n", self->name); return false; + } *out = self->ir_v; return true; } @@ -507,6 +509,7 @@ bool ast_global_codegen(ast_value *self, ir_builder *ir) return false; self->constval.vfunc->ir_func = func; + self->ir_v = func->value; /* The function is filled later on ast_function_codegen... */ return true; }