mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 14:12:36 +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);
|
v = ir_builder_create_field(ir, self->name, self->expression.next->expression.vtype);
|
||||||
if (!v)
|
if (!v)
|
||||||
return false;
|
return false;
|
||||||
|
v->context = ast_ctx(self);
|
||||||
if (self->isconst) {
|
if (self->isconst) {
|
||||||
asterror(ast_ctx(self), "TODO: constant field pointers with value\n");
|
asterror(ast_ctx(self), "TODO: constant field pointers with value\n");
|
||||||
goto error;
|
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");
|
asterror(ast_ctx(self), "ir_builder_create_global failed\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
v->context = ast_ctx(self);
|
||||||
|
|
||||||
if (self->isconst) {
|
if (self->isconst) {
|
||||||
switch (self->expression.vtype)
|
switch (self->expression.vtype)
|
||||||
|
|
Loading…
Reference in a new issue