Skip to content

Commit a7899ab

Browse files
committed
Retain property ids when they are already set and unique
This will enable setting loop unwinding assertion ids in GOTO programs by goto-instrument's loop unwinder.
1 parent fee89cc commit a7899ab

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/goto-programs/set_properties.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ void label_properties(
5959
if(!it->is_assert())
6060
continue;
6161

62+
if(!it->source_location().get_property_id().empty())
63+
{
64+
if(property_counters.emplace(it->source_location().get_property_id(), 0)
65+
.second)
66+
{
67+
continue;
68+
}
69+
}
70+
6271
irep_idt function = it->source_location().get_function();
6372

6473
std::string prefix=id2string(function);

0 commit comments

Comments
 (0)