File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -401,13 +401,13 @@ int janalyzer_parse_optionst::doit()
401401 log.status () << " Generating GOTO Program" << messaget::eom;
402402 lazy_goto_model.load_all_functions ();
403403
404- std::unique_ptr<abstract_goto_modelt > goto_model_ptr =
404+ std::unique_ptr<goto_modelt > goto_model_ptr =
405405 lazy_goto_modelt::process_whole_model_and_freeze (
406406 std::move (lazy_goto_model));
407407 if (goto_model_ptr == nullptr )
408408 return CPROVER_EXIT_INTERNAL_ERROR;
409409
410- goto_modelt &goto_model = dynamic_cast <goto_modelt &>( *goto_model_ptr) ;
410+ goto_modelt &goto_model = *goto_model_ptr;
411411
412412 // show it?
413413 if (cmdline.isset (" show-symbol-table" ))
Original file line number Diff line number Diff line change @@ -628,12 +628,16 @@ int jbmc_parse_optionst::get_goto_program(
628628
629629 // Move the model out of the local lazy_goto_model
630630 // and into the caller's goto_model
631- goto_model_ptr = lazy_goto_modelt::process_whole_model_and_freeze (
632- std::move (lazy_goto_model));
633- if (goto_model_ptr == nullptr )
631+ auto final_goto_model_ptr =
632+ lazy_goto_modelt::process_whole_model_and_freeze (
633+ std::move (lazy_goto_model));
634+ if (final_goto_model_ptr == nullptr )
634635 return CPROVER_EXIT_INTERNAL_ERROR;
635636
636- goto_modelt &goto_model = dynamic_cast <goto_modelt &>(*goto_model_ptr);
637+ goto_modelt &goto_model = *final_goto_model_ptr;
638+ goto_model_ptr =
639+ std::unique_ptr<abstract_goto_modelt>(final_goto_model_ptr.get ());
640+ final_goto_model_ptr.release ();
637641
638642 if (cmdline.isset (" validate-goto-model" ))
639643 {
You can’t perform that action at this time.
0 commit comments