File tree 2 files changed +5
-9
lines changed 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -288,8 +288,7 @@ void goto_unwindt::unwind(
288
288
}
289
289
290
290
PRECONDITION (!function_id.empty ());
291
- const irep_idt loop_id =
292
- id2string (function_id) + " ." + std::to_string (i_it->loop_number );
291
+ const irep_idt loop_id = goto_programt::loop_id (function_id, *i_it);
293
292
294
293
auto limit=unwindset.get_limit (loop_id, 0 );
295
294
Original file line number Diff line number Diff line change @@ -36,9 +36,8 @@ 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 "
40
+ << goto_programt::loop_id (function_identifier, *it) << " :"
42
41
<< " \n " ;
43
42
44
43
std::cout << " " << it->source_location << " \n " ;
@@ -53,9 +52,8 @@ void show_loop_ids(
53
52
{
54
53
if (it->is_backwards_goto ())
55
54
{
56
- unsigned loop_id=it->loop_number ;
57
55
std::string id =
58
- id2string (function_identifier) + " . " + std::to_string ( loop_id);
56
+ id2string (goto_programt:: loop_id(function_identifier, *it) );
59
57
60
58
xmlt xml_loop (" loop" , {{" name" , id}}, {});
61
59
xml_loop.new_element (" loop-id" ).data =id;
@@ -82,9 +80,8 @@ void show_loop_ids_json(
82
80
{
83
81
if (it->is_backwards_goto ())
84
82
{
85
- unsigned loop_id=it->loop_number ;
86
83
std::string id =
87
- id2string (function_identifier) + " . " + std::to_string ( loop_id);
84
+ id2string (goto_programt:: loop_id(function_identifier, *it) );
88
85
89
86
loops.push_back (
90
87
json_objectt ({{" name" , json_stringt (id)},
You can’t perform that action at this time.
0 commit comments