copy the function context over to its ir_value as well

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-08-24 19:49:12 +02:00
parent 74cb075665
commit 1fc8c2f697

1
ast.c
View file

@ -774,6 +774,7 @@ bool ast_global_codegen(ast_value *self, ir_builder *ir)
if (!func)
return false;
func->context = ast_ctx(self);
func->value->context = ast_ctx(self);
self->constval.vfunc->ir_func = func;
self->ir_v = func->value;