@@ -36,22 +36,6 @@ void ansi_c_languaget::modules_provided(std::set<std::string> &modules)
3636 modules.insert (get_base_name (parse_path, true ));
3737}
3838
39- // / Generate a _start function for a specific function
40- // / \param entry_function_symbol_id: The symbol for the function that should be
41- // / used as the entry point
42- // / \param symbol_table: The symbol table for the program. The new _start
43- // / function symbol will be added to this table
44- // / \return Returns false if the _start method was generated correctly
45- bool ansi_c_languaget::generate_start_function (
46- const irep_idt &entry_function_symbol_id,
47- symbol_tablet &symbol_table)
48- {
49- return generate_ansi_c_start_function (
50- symbol_table.symbols .at (entry_function_symbol_id),
51- symbol_table,
52- *message_handler);
53- }
54-
5539// / ANSI-C preprocessing
5640bool ansi_c_languaget::preprocess (
5741 std::istream &instream,
@@ -140,13 +124,19 @@ bool ansi_c_languaget::typecheck(
140124 return false ;
141125}
142126
143- bool ansi_c_languaget::final (symbol_tablet &symbol_table)
127+ bool ansi_c_languaget::generate_support_functions (
128+ symbol_tablet &symbol_table)
144129{
130+ // Note this can happen here because C doesn't currently
131+ // support lazy loading at the symbol-table level, and therefore
132+ // function bodies have already been populated and external stub
133+ // symbols created during the typecheck() phase. If it gains lazy
134+ // loading support then stubs will need to be created during
135+ // function body parsing, or else generate-stubs moved to the
136+ // final phase.
145137 generate_opaque_method_stubs (symbol_table);
146- if (ansi_c_entry_point (symbol_table, get_message_handler ()))
147- return true ;
148-
149- return false ;
138+ // This creates __CPROVER_start and __CPROVER_initialize:
139+ return ansi_c_entry_point (symbol_table, get_message_handler ());
150140}
151141
152142void ansi_c_languaget::show_parse (std::ostream &out)
0 commit comments