@@ -278,14 +278,14 @@ std::list<exprt> expressions_read(
278278 break ;
279279
280280 case RETURN:
281- if (to_code_return ( instruction.code ).return_value ().is_not_nil ())
282- dest.push_back (to_code_return ( instruction.code ).return_value ());
281+ if (instruction.get_return ( ).return_value ().is_not_nil ())
282+ dest.push_back (instruction.get_return ( ).return_value ());
283283 break ;
284284
285285 case FUNCTION_CALL:
286286 {
287- const code_function_callt &function_call=
288- to_code_function_call ( instruction.code );
287+ const code_function_callt &function_call =
288+ instruction.get_function_call ( );
289289 forall_expr (it, function_call.arguments ())
290290 dest.push_back (*it);
291291 if (function_call.lhs ().is_not_nil ())
@@ -295,7 +295,7 @@ std::list<exprt> expressions_read(
295295
296296 case ASSIGN:
297297 {
298- const code_assignt &assignment= to_code_assign ( instruction.code );
298+ const code_assignt &assignment = instruction.get_assign ( );
299299 dest.push_back (assignment.rhs ());
300300 parse_lhs_read (assignment.lhs (), dest);
301301 }
@@ -318,15 +318,15 @@ std::list<exprt> expressions_written(
318318 {
319319 case FUNCTION_CALL:
320320 {
321- const code_function_callt &function_call=
322- to_code_function_call ( instruction.code );
321+ const code_function_callt &function_call =
322+ instruction.get_function_call ( );
323323 if (function_call.lhs ().is_not_nil ())
324324 dest.push_back (function_call.lhs ());
325325 }
326326 break ;
327327
328328 case ASSIGN:
329- dest.push_back (to_code_assign ( instruction.code ).lhs ());
329+ dest.push_back (instruction.get_assign ( ).lhs ());
330330 break ;
331331
332332 default :
@@ -792,9 +792,9 @@ void goto_programt::instructiont::validate(
792792 source_location);
793793 DATA_CHECK_WITH_DIAGNOSTICS (
794794 vm,
795- !ns.lookup (to_code_decl (code ).get_identifier (), table_symbol),
795+ !ns.lookup (get_decl ( ).get_identifier (), table_symbol),
796796 " declared symbols should be known" ,
797- id2string (to_code_decl (code ).get_identifier ()),
797+ id2string (get_decl ( ).get_identifier ()),
798798 source_location);
799799 break ;
800800 case DEAD:
@@ -805,9 +805,9 @@ void goto_programt::instructiont::validate(
805805 source_location);
806806 DATA_CHECK_WITH_DIAGNOSTICS (
807807 vm,
808- !ns.lookup (to_code_dead (code ).get_identifier (), table_symbol),
808+ !ns.lookup (get_dead ( ).get_identifier (), table_symbol),
809809 " removed symbols should be known" ,
810- id2string (to_code_dead (code ).get_identifier ()),
810+ id2string (get_dead ( ).get_identifier ()),
811811 source_location);
812812 break ;
813813 case FUNCTION_CALL:
0 commit comments