mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-18 22:31:36 +00:00
ir_block_create_fieldaddress to pass on fieldtype from its input field
This commit is contained in:
parent
06ee0dc4f7
commit
03307a0903
1 changed files with 5 additions and 1 deletions
6
ir.c
6
ir.c
|
@ -1270,6 +1270,8 @@ on_error:
|
||||||
|
|
||||||
ir_value* ir_block_create_fieldaddress(ir_block *self, const char *label, ir_value *ent, ir_value *field)
|
ir_value* ir_block_create_fieldaddress(ir_block *self, const char *label, ir_value *ent, ir_value *field)
|
||||||
{
|
{
|
||||||
|
ir_value *v;
|
||||||
|
|
||||||
/* Support for various pointer types todo if so desired */
|
/* Support for various pointer types todo if so desired */
|
||||||
if (ent->vtype != TYPE_ENTITY)
|
if (ent->vtype != TYPE_ENTITY)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -1277,7 +1279,9 @@ ir_value* ir_block_create_fieldaddress(ir_block *self, const char *label, ir_val
|
||||||
if (field->vtype != TYPE_FIELD)
|
if (field->vtype != TYPE_FIELD)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return ir_block_create_general_instr(self, label, INSTR_ADDRESS, ent, field, TYPE_POINTER);
|
v = ir_block_create_general_instr(self, label, INSTR_ADDRESS, ent, field, TYPE_POINTER);
|
||||||
|
v->fieldtype = field->fieldtype;
|
||||||
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
ir_value* ir_block_create_load_from_ent(ir_block *self, const char *label, ir_value *ent, ir_value *field, int outype)
|
ir_value* ir_block_create_load_from_ent(ir_block *self, const char *label, ir_value *ent, ir_value *field, int outype)
|
||||||
|
|
Loading…
Reference in a new issue