Commit 9446bb8b authored by Matthias Braun's avatar Matthias Braun
Browse files

maintain method types variadicity,properties,calling convention when modifying them

parent 00aca724
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment