mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-12-03 17:11:57 +00:00
ir_builder_create_call to take return type from the ir_value
This commit is contained in:
parent
5348708da4
commit
67fa4ce07b
3 changed files with 4 additions and 4 deletions
2
ast.c
2
ast.c
|
@ -1210,7 +1210,7 @@ bool ast_call_codegen(ast_call *self, ast_function *func, bool lvalue, ir_value
|
|||
goto error;
|
||||
}
|
||||
|
||||
callinstr = ir_block_create_call(func->curblock, ast_function_label(func, "call"), funval, funval->outtype);
|
||||
callinstr = ir_block_create_call(func->curblock, ast_function_label(func, "call"), funval);
|
||||
if (!callinstr)
|
||||
goto error;
|
||||
|
||||
|
|
4
ir.c
4
ir.c
|
@ -1031,14 +1031,14 @@ bool ir_phi_add(ir_instr* self, ir_block *b, ir_value *v)
|
|||
}
|
||||
|
||||
/* call related code */
|
||||
ir_instr* ir_block_create_call(ir_block *self, const char *label, ir_value *func, int ot)
|
||||
ir_instr* ir_block_create_call(ir_block *self, const char *label, ir_value *func)
|
||||
{
|
||||
ir_value *out;
|
||||
ir_instr *in;
|
||||
in = ir_instr_new(self, INSTR_CALL0);
|
||||
if (!in)
|
||||
return NULL;
|
||||
out = ir_value_out(self->owner, label, store_value, ot);
|
||||
out = ir_value_out(self->owner, label, store_value, func->outtype);
|
||||
if (!out) {
|
||||
ir_instr_delete(in);
|
||||
return NULL;
|
||||
|
|
2
ir.h
2
ir.h
|
@ -198,7 +198,7 @@ ir_value* ir_block_create_div(ir_block*, const char *label, ir_value *l, ir_valu
|
|||
ir_instr* ir_block_create_phi(ir_block*, const char *label, int vtype);
|
||||
ir_value* ir_phi_value(ir_instr*);
|
||||
bool GMQCC_WARN ir_phi_add(ir_instr*, ir_block *b, ir_value *v);
|
||||
ir_instr* ir_block_create_call(ir_block*, const char *label, ir_value *func, int otype);
|
||||
ir_instr* ir_block_create_call(ir_block*, const char *label, ir_value *func);
|
||||
ir_value* ir_call_value(ir_instr*);
|
||||
bool GMQCC_WARN ir_call_param(ir_instr*, ir_value*);
|
||||
|
||||
|
|
Loading…
Reference in a new issue