File tree 1 file changed +4
-11
lines changed
1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -69,22 +69,15 @@ static bool link_functions(
69
69
goto_functionst::function_mapt::iterator dest_f_it=
70
70
dest_functions.function_map .find (final_id);
71
71
72
+ goto_functionst::goto_functiont &src_func = src_it->second ;
72
73
if (dest_f_it==dest_functions.function_map .end ()) // not there yet
73
74
{
74
- rename_symbols_in_function (src_it->second , final_id, rename_symbol);
75
-
76
- goto_functionst::goto_functiont &in_dest_symbol_table=
77
- dest_functions.function_map [final_id];
78
-
79
- in_dest_symbol_table.body .swap (src_it->second .body );
80
- in_dest_symbol_table.type =src_it->second .type ;
75
+ rename_symbols_in_function (src_func, final_id, rename_symbol);
76
+ dest_functions.function_map .emplace (final_id, std::move (src_func));
81
77
}
82
78
else // collision!
83
79
{
84
- goto_functionst::goto_functiont &in_dest_symbol_table=
85
- dest_functions.function_map [final_id];
86
-
87
- goto_functionst::goto_functiont &src_func=src_it->second ;
80
+ goto_functionst::goto_functiont &in_dest_symbol_table = dest_f_it->second ;
88
81
89
82
if (in_dest_symbol_table.body .instructions .empty () ||
90
83
weak_symbols.find (final_id)!=weak_symbols.end ())
You can’t perform that action at this time.
0 commit comments