provide the context to ir_functions

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-08-19 19:37:46 +02:00
parent 481baeeedc
commit cadf877eb4

1
ast.c
View file

@ -776,6 +776,7 @@ bool ast_global_codegen(ast_value *self, ir_builder *ir)
ir_function *func = ir_builder_create_function(ir, self->name, self->expression.next->expression.vtype);
if (!func)
return false;
func->context = ast_ctx(self);
self->constval.vfunc->ir_func = func;
self->ir_v = func->value;