From: Moritz Kroll Date: Sat, 21 Feb 2009 15:22:15 +0000 (+0000) Subject: Fixed set_method_value_param_type() X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=146b796a5c1e2a1055249ab62152e7cc7e4e4cbe;p=libfirm Fixed set_method_value_param_type() [r25540] --- diff --git a/ir/tr/type.c b/ir/tr/type.c index 5c12958d9..1978b4b90 100644 --- a/ir/tr/type.c +++ b/ir/tr/type.c @@ -1330,8 +1330,20 @@ ir_entity *get_method_value_param_ent(ir_type *method, int pos) { * Sets the type that represents the copied value arguments. */ void set_method_value_param_type(ir_type *method, ir_type *tp) { + int i, n; + assert(method && (method->type_op == type_method)); + assert(is_value_param_type(tp)); + assert(get_method_n_params(method) == get_struct_n_members(tp)); + method->attr.ma.value_params = tp; + + n = get_struct_n_members(tp); + for (i = 0; i < n; i++) + { + ir_entity *ent = get_struct_member(tp, i); + method->attr.ma.params[i].ent = ent; + } } /*