Skip to content

Deprecate old instructiont API #4177

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

Merged
merged 1 commit into from
Feb 14, 2019
Merged
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
34 changes: 34 additions & 0 deletions src/goto-programs/goto_program.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ class goto_programt
class instructiont final
{
public:
/// Do not read or modify directly -- use get_X() instead
codet code;

/// Get the assignment for ASSIGN
Expand Down Expand Up @@ -352,34 +353,64 @@ class goto_programt
clear(SKIP);
}

DEPRECATED("use goto_programt::make_return() instead")
void make_return() { clear(RETURN); }

DEPRECATED("use goto_programt::make_skip() instead")
void make_skip() { clear(SKIP); }

DEPRECATED("use goto_programt::make_location() instead")
void make_location(const source_locationt &l)
{ clear(LOCATION); source_location=l; }

DEPRECATED("use goto_programt::make_throw() instead")
void make_throw() { clear(THROW); }

DEPRECATED("use goto_programt::make_catch() instead")
void make_catch() { clear(CATCH); }

DEPRECATED("use goto_programt::make_assertion() instead")
void make_assertion(const exprt &g) { clear(ASSERT); guard=g; }

DEPRECATED("use goto_programt::make_assumption() instead")
void make_assumption(const exprt &g) { clear(ASSUME); guard=g; }

DEPRECATED("use goto_programt::make_assignment() instead")
void make_assignment() { clear(ASSIGN); }

DEPRECATED("use goto_programt::make_other() instead")
void make_other(const codet &_code) { clear(OTHER); code=_code; }

DEPRECATED("use goto_programt::make_decl() instead")
void make_decl() { clear(DECL); }

DEPRECATED("use goto_programt::make_dead() instead")
void make_dead() { clear(DEAD); }

DEPRECATED("use goto_programt::make_atomic_begin() instead")
void make_atomic_begin() { clear(ATOMIC_BEGIN); }

DEPRECATED("use goto_programt::make_atomic_end() instead")
void make_atomic_end() { clear(ATOMIC_END); }

DEPRECATED("use goto_programt::make_atomic_end_function() instead")
void make_end_function() { clear(END_FUNCTION); }

DEPRECATED("use goto_programt::make_incomplete_goto() instead")
void make_incomplete_goto(const code_gotot &_code)
{
clear(INCOMPLETE_GOTO);
code = _code;
}

DEPRECATED("use goto_programt::make_goto() instead")
void make_goto(targett _target)
{
clear(GOTO);
targets.push_back(_target);
}

DEPRECATED("use goto_programt::make_goto() instead")
void make_goto(targett _target, const exprt &g)
{
make_goto(_target);
Expand All @@ -394,18 +425,21 @@ class goto_programt
type = GOTO;
}

DEPRECATED("use goto_programt::make_assignment() instead")
void make_assignment(const code_assignt &_code)
{
clear(ASSIGN);
code=_code;
}

DEPRECATED("use goto_programt::make_decl() instead")
void make_decl(const code_declt &_code)
{
clear(DECL);
code=_code;
}

DEPRECATED("use goto_programt::make_function_call() instead")
void make_function_call(const code_function_callt &_code)
{
clear(FUNCTION_CALL);
Expand Down