From: Wolfgang (Blub) Bumiller Date: Sun, 25 Nov 2012 12:33:00 +0000 (+0100) Subject: removing ir_function_get_local - it's unused X-Git-Tag: 0.1.9~284 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=060f995ca4b84c951d31d329bb9653c5c3b41d68;p=xonotic%2Fgmqcc.git removing ir_function_get_local - it's unused --- diff --git a/ir.c b/ir.c index 6c1e589..95ff8d2 100644 --- a/ir.c +++ b/ir.c @@ -547,25 +547,10 @@ bool ir_function_finalize(ir_function *self) return true; } -ir_value* ir_function_get_local(ir_function *self, const char *name) -{ - size_t i; - for (i = 0; i < vec_size(self->locals); ++i) { - if (!strcmp(self->locals[i]->name, name)) - return self->locals[i]; - } - return NULL; -} - ir_value* ir_function_create_local(ir_function *self, const char *name, int vtype, bool param) { ir_value *ve; - /* - if (ir_function_get_local(self, name)) - return NULL; - */ - if (param && vec_size(self->locals) && self->locals[vec_size(self->locals)-1]->store != store_param) { diff --git a/ir.h b/ir.h index bb26cff..324335f 100644 --- a/ir.h +++ b/ir.h @@ -271,7 +271,6 @@ void ir_function_collect_value(ir_function*, ir_value *value); bool ir_function_set_name(ir_function*, const char *name); -ir_value* ir_function_get_local(ir_function *self, const char *name); ir_value* ir_function_create_local(ir_function *self, const char *name, int vtype, bool param); bool GMQCC_WARN ir_function_finalize(ir_function*);