@@ -134,8 +134,7 @@ void remove_exceptionst::add_exceptional_returns(
134
134
const irep_idt &function_id=func_it->first ;
135
135
goto_programt &goto_program=func_it->second .body ;
136
136
137
- symbol_tablet::opt_const_symbol_reft maybe_symbol=
138
- symbol_table.lookup (function_id);
137
+ auto maybe_symbol=symbol_table.lookup (function_id);
139
138
INVARIANT (maybe_symbol, " functions should be recorded in the symbol table" );
140
139
const symbolt &function_symbol=*maybe_symbol;
141
140
@@ -255,11 +254,9 @@ void remove_exceptionst::instrument_exception_handler(
255
254
to_code_landingpad (instr_it->code ).catch_expr ();
256
255
irep_idt thrown_exception_global=id2string (function_id)+EXC_SUFFIX;
257
256
258
- symbol_tablet::opt_const_symbol_reft maybe_symbol=
259
- symbol_table.lookup (thrown_exception_global);
260
- if (maybe_symbol)
257
+ if (const auto maybe_symbol=symbol_table.lookup (thrown_exception_global))
261
258
{
262
- const symbol_exprt thrown_global_symbol=maybe_symbol->get (). symbol_expr ();
259
+ const symbol_exprt thrown_global_symbol=maybe_symbol->symbol_expr ();
263
260
// next we reset the exceptional return to NULL
264
261
null_pointer_exprt null_voidptr ((pointer_type (empty_typet ())));
265
262
@@ -425,9 +422,9 @@ void remove_exceptionst::instrument_function_call(
425
422
const irep_idt &callee_id=
426
423
to_symbol_expr (function_call.function ()).get_identifier ();
427
424
428
- symbol_tablet::opt_const_symbol_reft callee_inflight_exception=
425
+ const auto callee_inflight_exception=
429
426
symbol_table.lookup (id2string (callee_id)+EXC_SUFFIX);
430
- symbol_tablet::opt_const_symbol_reft local_inflight_exception=
427
+ const auto local_inflight_exception=
431
428
symbol_table.lookup (id2string (function_id)+EXC_SUFFIX);
432
429
433
430
if (callee_inflight_exception && local_inflight_exception)
@@ -436,9 +433,9 @@ void remove_exceptionst::instrument_function_call(
436
433
func_it, instr_it, stack_catch, locals);
437
434
438
435
const symbol_exprt callee_inflight_exception_expr=
439
- callee_inflight_exception->get (). symbol_expr ();
436
+ callee_inflight_exception->symbol_expr ();
440
437
const symbol_exprt local_inflight_exception_expr=
441
- local_inflight_exception->get (). symbol_expr ();
438
+ local_inflight_exception->symbol_expr ();
442
439
443
440
// add a null check (so that instanceof can be applied)
444
441
equal_exprt eq_null (
0 commit comments