From: Matthias Braun Date: Fri, 5 Aug 2011 09:06:45 +0000 (+0200) Subject: maintain method types variadicity,properties,calling convention when modifying them X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=9446bb8b37ea9240993bdae61f27192c9ec4f88d;p=libfirm maintain method types variadicity,properties,calling convention when modifying them --- diff --git a/ir/lower/lower_calls.c b/ir/lower/lower_calls.c index 32a89f2aa..2560b3f09 100644 --- a/ir/lower/lower_calls.c +++ b/ir/lower/lower_calls.c @@ -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); diff --git a/ir/lower/lower_dw.c b/ir/lower/lower_dw.c index 77ae30361..7b7db7519 100644 --- a/ir/lower/lower_dw.c +++ b/ir/lower/lower_dw.c @@ -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);