Skip to content

Rebuild-goto-functions: call get_language_options #1435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/cbmc/cbmc_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,7 @@ int cbmc_parse_optionst::get_goto_program(
const std::string &function_id=cmdline.get_value("function");
rebuild_goto_start_functiont start_function_rebuilder(
get_message_handler(),
cmdline,
goto_model.symbol_table,
goto_model.goto_functions);

Expand Down
1 change: 1 addition & 0 deletions src/goto-programs/initialize_goto_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ bool initialize_goto_model(
const std::string &function_id=cmdline.get_value("function");
rebuild_goto_start_functiont start_function_rebuilder(
msg.get_message_handler(),
cmdline,
goto_model.symbol_table,
goto_model.goto_functions);

Expand Down
3 changes: 3 additions & 0 deletions src/goto-programs/rebuild_goto_start_function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
/// body of the _start function).
rebuild_goto_start_functiont::rebuild_goto_start_functiont(
message_handlert &_message_handler,
const cmdlinet &cmdline,
symbol_tablet &symbol_table,
goto_functionst &goto_functions):
messaget(_message_handler),
cmdline(cmdline),
symbol_table(symbol_table),
goto_functions(goto_functions)
{
Expand All @@ -50,6 +52,7 @@ bool rebuild_goto_start_functiont::operator()(
std::unique_ptr<languaget> language=get_language_from_mode(mode);
INVARIANT(language, "No language found for mode: "+id2string(mode));
language->set_message_handler(get_message_handler());
language->get_language_options(cmdline);

// To create a new entry point we must first remove the old one
remove_existing_entry_point();
Expand Down
3 changes: 3 additions & 0 deletions src/goto-programs/rebuild_goto_start_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#ifndef CPROVER_GOTO_PROGRAMS_REBUILD_GOTO_START_FUNCTION_H
#define CPROVER_GOTO_PROGRAMS_REBUILD_GOTO_START_FUNCTION_H

#include <util/cmdline.h>
#include <util/message.h>

class symbol_tablet;
Expand All @@ -25,6 +26,7 @@ class rebuild_goto_start_functiont: public messaget
public:
rebuild_goto_start_functiont(
message_handlert &_message_handler,
const cmdlinet &cmdline,
symbol_tablet &symbol_table,
goto_functionst &goto_functions);

Expand All @@ -35,6 +37,7 @@ class rebuild_goto_start_functiont: public messaget

void remove_existing_entry_point();

const cmdlinet &cmdline;
symbol_tablet &symbol_table;
goto_functionst &goto_functions;
};
Expand Down