maintain method types variadicity,properties,calling convention when modifying them
authorMatthias Braun <matze@braunis.de>
Fri, 5 Aug 2011 09:06:45 +0000 (11:06 +0200)
committerMatthias Braun <matze@braunis.de>
Fri, 5 Aug 2011 09:13:23 +0000 (11:13 +0200)
ir/lower/lower_calls.c
ir/lower/lower_dw.c

index 32a89f2..2560b3f 100644 (file)
@@ -158,6 +158,7 @@ static ir_type *lower_mtp(compound_call_lowering_flags flags, ir_type *mtp)
 
        /* associate the lowered type with the original one for easier access */
        set_method_calling_convention(lowered, get_method_calling_convention(mtp) | cc_compound_ret);
+       set_method_additional_properties(lowered, get_method_additional_properties(mtp));
 
        set_lowered_type(mtp, lowered);
        pmap_insert(lowered_mtps, mtp, lowered);
index 77ae303..7b7db75 100644 (file)
@@ -1711,7 +1711,7 @@ static ir_type *lower_mtp(ir_type *mtp)
                return mtp;
        }
 
-       res = new_type_method(n_param, n_res);
+       res = new_d_type_method(n_param, n_res, get_type_dbg_info(mtp));
 
        /* set param types and result types */
        for (i = n_param = 0; i < orig_n_params; ++i) {
@@ -1764,6 +1764,11 @@ static ir_type *lower_mtp(ir_type *mtp)
                        set_method_res_type(res, n_res++, tp);
                }
        }
+
+       set_method_variadicity(res, get_method_variadicity(mtp));
+       set_method_calling_convention(res, get_method_calling_convention(mtp));
+       set_method_additional_properties(res, get_method_additional_properties(mtp));
+
        set_lowered_type(mtp, res);
        set_type_link(res, mtp);