From 67fa4ce07bc416d3c7959e1c35110514b6cd963b Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Fri, 29 Jun 2012 12:55:35 +0200 Subject: [PATCH] ir_builder_create_call to take return type from the ir_value --- ast.c | 2 +- ir.c | 4 ++-- ir.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ast.c b/ast.c index a155f50..0b6243d 100644 --- a/ast.c +++ b/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; diff --git a/ir.c b/ir.c index e05f4d7..fcce9a6 100644 --- a/ir.c +++ b/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; diff --git a/ir.h b/ir.h index 9379d70..73ad3ce 100644 --- a/ir.h +++ b/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*); -- 2.39.2