From 53b99062427d685e353fbb7c18841d93cccc08c0 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Sun, 19 Aug 2012 20:43:04 +0200 Subject: [PATCH] have the ir take over some more context data from the ast --- ast.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ast.c b/ast.c index 67306a1..f2d055d 100644 --- a/ast.c +++ b/ast.c @@ -788,6 +788,7 @@ bool ast_global_codegen(ast_value *self, ir_builder *ir) v = ir_builder_create_field(ir, self->name, self->expression.next->expression.vtype); if (!v) return false; + v->context = ast_ctx(self); if (self->isconst) { asterror(ast_ctx(self), "TODO: constant field pointers with value\n"); goto error; @@ -801,6 +802,7 @@ bool ast_global_codegen(ast_value *self, ir_builder *ir) asterror(ast_ctx(self), "ir_builder_create_global failed\n"); return false; } + v->context = ast_ctx(self); if (self->isconst) { switch (self->expression.vtype) -- 2.39.2