mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-11 03:13:06 +00:00
Storing ir_v for functions
This commit is contained in:
parent
d259e75dc4
commit
001420a7ef
1 changed files with 4 additions and 1 deletions
5
ast.c
5
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue