From: Michael Beck Date: Tue, 20 Jan 2009 13:08:18 +0000 (+0000) Subject: - set this-call when removing trampolines X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=6885fb1883be20e607b92ffa30d4cb96da166f69;p=libfirm - set this-call when removing trampolines [r25299] --- diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index f761a8a57..50a00bc04 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -5768,7 +5768,8 @@ static ir_node *transform_node_Call(ir_node *call) { if (var == variadicity_variadic) { set_method_first_variadic_param_index(ctp, get_method_first_variadic_param_index(mtp) + 1); } - set_method_calling_convention(ctp, get_method_calling_convention(mtp)); + /* When we resolve a trampoline, the function must be called by a this-call */ + set_method_calling_convention(ctp, get_method_calling_convention(mtp) | cc_this_call); set_method_additional_properties(ctp, get_method_additional_properties(mtp)); adr = get_Builtin_param(callee, 1);