@@ -228,7 +228,7 @@ void remove_exceptionst::instrument_exception_handler(
228228 const goto_programt::targett &instr_it,
229229 bool may_catch)
230230{
231- PRECONDITION (instr_it->type == CATCH);
231+ PRECONDITION (instr_it->type () == CATCH);
232232
233233 if (may_catch)
234234 {
@@ -404,7 +404,7 @@ bool remove_exceptionst::instrument_throw(
404404 const remove_exceptionst::stack_catcht &stack_catch,
405405 const std::vector<symbol_exprt> &locals)
406406{
407- PRECONDITION (instr_it->type == THROW);
407+ PRECONDITION (instr_it->type () == THROW);
408408
409409 const exprt &exc_expr =
410410 uncaught_exceptions_domaint::get_exception_symbol (instr_it->get_code ());
@@ -421,7 +421,7 @@ bool remove_exceptionst::instrument_throw(
421421 exc_thrown,
422422 typecast_exprt (exc_expr, exc_thrown.type ()));
423423 // now turn the `throw' into `assignment'
424- instr_it->type = ASSIGN;
424+ instr_it->type_nonconst () = ASSIGN;
425425 instr_it->code_nonconst () = assignment;
426426
427427 return true ;
@@ -437,7 +437,7 @@ remove_exceptionst::instrument_function_call(
437437 const stack_catcht &stack_catch,
438438 const std::vector<symbol_exprt> &locals)
439439{
440- PRECONDITION (instr_it->type == FUNCTION_CALL);
440+ PRECONDITION (instr_it->type () == FUNCTION_CALL);
441441
442442 // save the address of the next instruction
443443 goto_programt::targett next_it=instr_it;
@@ -512,7 +512,7 @@ void remove_exceptionst::instrument_exceptions(
512512 locals.push_back (instr_it->decl_symbol ());
513513 }
514514 // Is it a handler push/pop or catch landing-pad?
515- else if (instr_it->type == CATCH)
515+ else if (instr_it->type () == CATCH)
516516 {
517517 const irep_idt &statement = instr_it->get_code ().get_statement ();
518518 // Is it an exception landing pad (start of a catch block)?
@@ -584,12 +584,12 @@ void remove_exceptionst::instrument_exceptions(
584584 instr_it->turn_into_skip ();
585585 did_something = true ;
586586 }
587- else if (instr_it->type == THROW)
587+ else if (instr_it->type () == THROW)
588588 {
589589 did_something = instrument_throw (
590590 function_identifier, goto_program, instr_it, stack_catch, locals);
591591 }
592- else if (instr_it->type == FUNCTION_CALL)
592+ else if (instr_it->type () == FUNCTION_CALL)
593593 {
594594 instrumentation_resultt result =
595595 instrument_function_call (
0 commit comments