File tree 2 files changed +4
-11
lines changed 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -281,8 +281,7 @@ void goto_unwindt::unwind(
281
281
const irep_idt func=i_it->function ;
282
282
assert (!func.empty ());
283
283
284
- const irep_idt loop_id=
285
- id2string (func) + " ." + std::to_string (i_it->loop_number );
284
+ const irep_idt loop_id = goto_programt::loop_id (func, *i_it);
286
285
287
286
auto limit=unwindset.get_limit (loop_id, 0 );
288
287
Original file line number Diff line number Diff line change @@ -36,9 +36,7 @@ void show_loop_ids(
36
36
{
37
37
if (it->is_backwards_goto ())
38
38
{
39
- unsigned loop_id=it->loop_number ;
40
-
41
- std::cout << " Loop " << function_identifier << " ." << loop_id << " :"
39
+ std::cout << " Loop " << goto_programt::loop_id (function_identifier, *it) << " :"
42
40
<< " \n " ;
43
41
44
42
std::cout << " " << it->source_location << " \n " ;
@@ -53,9 +51,7 @@ void show_loop_ids(
53
51
{
54
52
if (it->is_backwards_goto ())
55
53
{
56
- unsigned loop_id=it->loop_number ;
57
- std::string id =
58
- id2string (function_identifier) + " ." + std::to_string (loop_id);
54
+ std::string id = id2string (goto_programt::loop_id (function_identifier, *it));
59
55
60
56
xmlt xml_loop (" loop" , {{" name" , id}}, {});
61
57
xml_loop.new_element (" loop-id" ).data =id;
@@ -82,9 +78,7 @@ void show_loop_ids_json(
82
78
{
83
79
if (it->is_backwards_goto ())
84
80
{
85
- unsigned loop_id=it->loop_number ;
86
- std::string id =
87
- id2string (function_identifier) + " ." + std::to_string (loop_id);
81
+ std::string id = id2string (goto_programt::loop_id (function_identifier, *it));
88
82
89
83
loops.push_back (
90
84
json_objectt ({{" name" , json_stringt (id)},
You can’t perform that action at this time.
0 commit comments