]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
provide the context to ir_functions
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 19 Aug 2012 17:37:46 +0000 (19:37 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 19 Aug 2012 17:37:46 +0000 (19:37 +0200)
ast.c

diff --git a/ast.c b/ast.c
index 8bbce8f9ace654057a0f54ba98d143b9a24b612e..15703886e353fd318c8c10faf9ee96c686cb58af 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -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;