@@ -342,22 +342,6 @@ std::string taint_summaryt::description() const noexcept
342
342
// /
343
343
// //////////////////////////////////////////////////////////////////////////////
344
344
345
-
346
- symbol_exprt find_or_create_symbol_expr (
347
- const namespacet &ns,
348
- const irep_idt &symbol_name,
349
- const typet &symbol_type)
350
- {
351
- const symbolt *symbol_ptr;
352
- if (ns.lookup (symbol_name, symbol_ptr))
353
- {
354
- assert (false );
355
- return symbol_exprt (symbol_name, symbol_type);
356
- }
357
- assert (symbol_ptr!=nullptr );
358
- return symbol_ptr->symbol_expr ();
359
- }
360
-
361
345
// / \brief If the passed expression in a non-null pointer expression, then
362
346
// / the dereference expression is returned. Otherwise the original expression
363
347
// / is returned.
@@ -1096,7 +1080,7 @@ numbered_lvalue_to_taint_mapt taint_algorithm_computing_summary_of_functiont::
1096
1080
if (callee_expr.id ()==ID_symbol)
1097
1081
{
1098
1082
irep_idt callee_id = to_symbol_expr (callee_expr).get_identifier ();
1099
- const std::string callee_ident = as_string (callee_id);
1083
+ const std::string & callee_ident = as_string (callee_id);
1100
1084
const code_typet &fn_type =
1101
1085
program->get_functions ().function_map .at (callee_id).type ;
1102
1086
if (database.contains (callee_id))
@@ -1187,10 +1171,8 @@ numbered_lvalue_to_taint_mapt taint_algorithm_computing_summary_of_functiont::
1187
1171
&result_location))
1188
1172
{
1189
1173
// Update of return_value of the callee.
1190
- result_lvalue = find_or_create_symbol_expr (
1191
- program->get_namespace (),
1192
- callee_ident + RETURN_VALUE_SUFFIX,
1193
- fn_type.return_type ());
1174
+ result_lvalue = program->get_namespace ()
1175
+ .lookup (callee_ident + RETURN_VALUE_SUFFIX).symbol_expr ();
1194
1176
}
1195
1177
else if (
1196
1178
const taintable_location_argumentt *result_argument =
@@ -1253,10 +1235,8 @@ numbered_lvalue_to_taint_mapt taint_algorithm_computing_summary_of_functiont::
1253
1235
&sanitized_location))
1254
1236
{
1255
1237
// Update of return_value of the callee.
1256
- result_lvalue = find_or_create_symbol_expr (
1257
- program->get_namespace (),
1258
- callee_ident + RETURN_VALUE_SUFFIX,
1259
- fn_type.return_type ());
1238
+ result_lvalue = program->get_namespace ()
1239
+ .lookup (callee_ident + RETURN_VALUE_SUFFIX).symbol_expr ();
1260
1240
}
1261
1241
else if (
1262
1242
const taintable_location_argumentt *sanitized_argument =
0 commit comments