]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
ir_builder_create_call to take return type from the ir_value
authorWolfgang (Blub) Bumiller <blub@speed.at>
Fri, 29 Jun 2012 10:55:35 +0000 (12:55 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Fri, 29 Jun 2012 10:55:35 +0000 (12:55 +0200)
ast.c
ir.c
ir.h

diff --git a/ast.c b/ast.c
index a155f50d879662f4b0bbd4231d405bff1b647d2b..0b6243dcf508f7a14154192b3bb235eb2783a2c9 100644 (file)
--- 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 e05f4d70615034352a6ee76a2364e56c23f5457f..fcce9a6c9ece29d7337345ba5434395785f97671 100644 (file)
--- 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 9379d70d416bff90c130beaa7a3d7454a237d70e..73ad3cece87ef836e0efd98c8fb622b1824ba717 100644 (file)
--- 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*);