File tree 2 files changed +10
-6
lines changed
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()
401
401
log .status () << " Generating GOTO Program" << messaget::eom;
402
402
lazy_goto_model.load_all_functions ();
403
403
404
- std::unique_ptr<abstract_goto_modelt > goto_model_ptr =
404
+ std::unique_ptr<goto_modelt > goto_model_ptr =
405
405
lazy_goto_modelt::process_whole_model_and_freeze (
406
406
std::move (lazy_goto_model));
407
407
if (goto_model_ptr == nullptr )
408
408
return CPROVER_EXIT_INTERNAL_ERROR;
409
409
410
- goto_modelt &goto_model = dynamic_cast <goto_modelt &>( *goto_model_ptr) ;
410
+ goto_modelt &goto_model = *goto_model_ptr;
411
411
412
412
// show it?
413
413
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(
628
628
629
629
// Move the model out of the local lazy_goto_model
630
630
// 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 )
634
635
return CPROVER_EXIT_INTERNAL_ERROR;
635
636
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 ();
637
641
638
642
if (cmdline.isset (" validate-goto-model" ))
639
643
{
You can’t perform that action at this time.
0 commit comments