Skip to content

Use goto_programt::make_X factories in goto_convert #4000

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 2 commits into from
Jan 31, 2019
Merged
Changes from 1 commit
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
7 changes: 7 additions & 0 deletions src/goto-programs/goto_program.h
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,13 @@ class goto_programt
return instructiont(code_returnt(), irep_idt(), l, RETURN, nil_exprt(), {});
}

static instructiont make_return(
code_returnt c,
const source_locationt &l = source_locationt::nil())
{
return instructiont(std::move(c), irep_idt(), l, RETURN, nil_exprt(), {});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to make progress on #3126, which removes all these irep_idt() in the make_* functions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed!

}

static instructiont
make_skip(const source_locationt &l = source_locationt::nil())
{
Expand Down