Skip to content
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
6 changes: 2 additions & 4 deletions src/goto-instrument/goto_program2code.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -775,15 +775,15 @@ bool goto_program2codet::set_block_end_points(
cases_listt &cases,
std::set<unsigned> &processed_locations)
{
std::map<goto_programt::const_targett, std::size_t> targets_done;
std::set<goto_programt::const_targett> targets_done;

for(cases_listt::iterator it=cases.begin();
it!=cases.end();
++it)
{
// some branch targets may be shared by multiple branch instructions,
// as in case 1: case 2: code; we build a nested code_switch_caset
if(targets_done.find(it->case_start)!=targets_done.end())
if(!targets_done.insert(it->case_start).second)
continue;

// compute the block that belongs to this case
Expand Down Expand Up @@ -819,8 +819,6 @@ bool goto_program2codet::set_block_end_points(

it->case_last=case_end;
}

targets_done[it->case_start]=1;
}

return false;
Expand Down