@@ -737,6 +737,8 @@ void remove_virtual_functionst::operator()(goto_functionst &functions)
737
737
738
738
// / Remove virtual function calls from all functions in the specified
739
739
// / list and replace them with their most derived implementations
740
+ // / \param symbol_table: symbol table associated with \p goto_functions
741
+ // / \param goto_functions: functions from which to remove virtual function calls
740
742
void remove_virtual_functions (
741
743
symbol_table_baset &symbol_table,
742
744
goto_functionst &goto_functions)
@@ -747,14 +749,47 @@ void remove_virtual_functions(
747
749
rvf (goto_functions);
748
750
}
749
751
752
+ // / Remove virtual function calls from all functions in the specified
753
+ // / list and replace them with their most derived implementations
754
+ // / \param symbol_table: symbol table associated with \p goto_functions
755
+ // / \param goto_functions: functions from which to remove virtual function calls
756
+ // / \param class_hierarchy: class hierarchy derived from symbol_table
757
+ // / This should already be populated (i.e. class_hierarchyt::operator() has
758
+ // / already been called)
759
+ void remove_virtual_functions (
760
+ symbol_table_baset &symbol_table,
761
+ goto_functionst &goto_functions,
762
+ const class_hierarchyt &class_hierarchy)
763
+ {
764
+ remove_virtual_functionst rvf (symbol_table, class_hierarchy);
765
+ rvf (goto_functions);
766
+ }
767
+
750
768
// / Remove virtual function calls from the specified model
769
+ // / \param goto_model: model from which to remove virtual functions
751
770
void remove_virtual_functions (goto_modelt &goto_model)
752
771
{
753
772
remove_virtual_functions (
754
773
goto_model.symbol_table , goto_model.goto_functions );
755
774
}
756
775
776
+ // / Remove virtual function calls from the specified model
777
+ // / \param goto_model: model from which to remove virtual functions
778
+ // / \param class_hierarchy: class hierarchy derived from model.symbol_table
779
+ // / This should already be populated (i.e. class_hierarchyt::operator() has
780
+ // / already been called)
781
+ void remove_virtual_functions (
782
+ goto_modelt &goto_model,
783
+ const class_hierarchyt &class_hierarchy)
784
+ {
785
+ remove_virtual_functions (
786
+ goto_model.symbol_table , goto_model.goto_functions , class_hierarchy);
787
+ }
788
+
757
789
// / Remove virtual function calls from the specified model function
790
+ // / May change the location numbers in `function`.
791
+ // / \param function: function from which virtual functions should be converted
792
+ // / to explicit dispatch tables.
758
793
void remove_virtual_functions (goto_model_functiont &function)
759
794
{
760
795
class_hierarchyt class_hierarchy;
@@ -764,6 +799,22 @@ void remove_virtual_functions(goto_model_functiont &function)
764
799
function.get_function_id (), function.get_goto_function ().body );
765
800
}
766
801
802
+ // / Remove virtual function calls from the specified model function
803
+ // / May change the location numbers in `function`.
804
+ // / \param function: function from which virtual functions should be converted
805
+ // / to explicit dispatch tables.
806
+ // / \param class_hierarchy: class hierarchy derived from function.symbol_table
807
+ // / This should already be populated (i.e. class_hierarchyt::operator() has
808
+ // / already been called)
809
+ void remove_virtual_functions (
810
+ goto_model_functiont &function,
811
+ const class_hierarchyt &class_hierarchy)
812
+ {
813
+ remove_virtual_functionst rvf (function.get_symbol_table (), class_hierarchy);
814
+ rvf.remove_virtual_functions (
815
+ function.get_function_id (), function.get_goto_function ().body );
816
+ }
817
+
767
818
// / Replace virtual function call with a static function call
768
819
// / Achieved by substituting a virtual function with its most derived
769
820
// / implementation. If there's a type mismatch between implementation
0 commit comments