@@ -75,20 +75,20 @@ static bool link_functions(
75
75
Forall_goto_functions (src_it, src_functions)
76
76
{
77
77
// the function might have been renamed
78
- rename_symbolt::expr_mapt::const_iterator e_it=
78
+ rename_symbolt::expr_mapt::const_iterator e_it =
79
79
rename_symbol.expr_map .find (src_it->first );
80
80
81
- irep_idt final_id= src_it->first ;
81
+ irep_idt final_id = src_it->first ;
82
82
83
- if (e_it!= rename_symbol.expr_map .end ())
84
- final_id= e_it->second ;
83
+ if (e_it != rename_symbol.expr_map .end ())
84
+ final_id = e_it->second ;
85
85
86
86
// already there?
87
- goto_functionst::function_mapt::iterator dest_f_it=
87
+ goto_functionst::function_mapt::iterator dest_f_it =
88
88
dest_functions.function_map .find (final_id);
89
89
90
90
goto_functionst::goto_functiont &src_func = src_it->second ;
91
- if (dest_f_it== dest_functions.function_map .end ()) // not there yet
91
+ if (dest_f_it == dest_functions.function_map .end ()) // not there yet
92
92
{
93
93
rename_symbols_in_function (src_func, final_id, rename_symbol);
94
94
dest_functions.function_map .emplace (final_id, std::move (src_func));
@@ -97,8 +97,9 @@ static bool link_functions(
97
97
{
98
98
goto_functionst::goto_functiont &in_dest_symbol_table = dest_f_it->second ;
99
99
100
- if (in_dest_symbol_table.body .instructions .empty () ||
101
- weak_symbols.find (final_id)!=weak_symbols.end ())
100
+ if (
101
+ in_dest_symbol_table.body .instructions .empty () ||
102
+ weak_symbols.find (final_id) != weak_symbols.end ())
102
103
{
103
104
// the one with body wins!
104
105
rename_symbols_in_function (src_func, final_id, rename_symbol);
@@ -107,8 +108,9 @@ static bool link_functions(
107
108
in_dest_symbol_table.parameter_identifiers .swap (
108
109
src_func.parameter_identifiers );
109
110
}
110
- else if (src_func.body .instructions .empty () ||
111
- src_ns.lookup (src_it->first ).is_weak )
111
+ else if (
112
+ src_func.body .instructions .empty () ||
113
+ src_ns.lookup (src_it->first ).is_weak )
112
114
{
113
115
// just keep the old one in dest
114
116
}
@@ -161,9 +163,8 @@ static void link_goto_model(
161
163
linking.object_type_updates .get_expr_map ().end ());
162
164
}
163
165
164
- static void finalize_linking (
165
- goto_modelt &dest,
166
- const replace_symbolt &object_type_updates)
166
+ static void
167
+ finalize_linking (goto_modelt &dest, const replace_symbolt &object_type_updates)
167
168
{
168
169
goto_functionst &dest_functions = dest.goto_functions ;
169
170
symbol_tablet &dest_symbol_table = dest.symbol_table ;
@@ -180,15 +181,15 @@ static void finalize_linking(
180
181
INVARIANT (symbol.value .id () == ID_symbol, " must have symbol" );
181
182
const irep_idt &id = to_symbol_expr (symbol.value ).get_identifier ();
182
183
183
- #if 0
184
+ #if 0
184
185
if(!base_type_eq(symbol.type, ns.lookup(id).type, ns))
185
186
{
186
187
std::cerr << symbol << '\n';
187
188
std::cerr << ns.lookup(id) << '\n';
188
189
}
189
190
INVARIANT(base_type_eq(symbol.type, ns.lookup(id).type, ns),
190
191
"type matches");
191
- #endif
192
+ #endif
192
193
193
194
macro_application.insert_expr (symbol.name , id);
194
195
}
@@ -197,7 +198,7 @@ static void finalize_linking(
197
198
if (!macro_application.expr_map .empty ())
198
199
Forall_goto_functions (dest_it, dest_functions)
199
200
{
200
- irep_idt final_id= dest_it->first ;
201
+ irep_idt final_id = dest_it->first ;
201
202
rename_symbols_in_function (dest_it->second , final_id, macro_application);
202
203
}
203
204
0 commit comments