mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-23 20:33:05 +00:00
have the ir take over some more context data from the ast
This commit is contained in:
parent
f0f9680774
commit
53b9906242
1 changed files with 2 additions and 0 deletions
2
ast.c
2
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)
|
||||
|
|
Loading…
Reference in a new issue