Skip to content

Commit 80ba3cf

Browse files
committed
Make rename_symbol a no-op if its maps are empty
1 parent 7300d07 commit 80ba3cf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/util/rename_symbol.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ Function: rename_symbolt::have_to_rename
133133

134134
bool rename_symbolt::have_to_rename(const exprt &dest) const
135135
{
136+
if(expr_map.empty() && type_map.empty())
137+
return false;
138+
136139
// first look at type
137140

138141
if(have_to_rename(dest.type()))
@@ -274,6 +277,9 @@ Function: rename_symbolt::have_to_rename
274277

275278
bool rename_symbolt::have_to_rename(const typet &dest) const
276279
{
280+
if(expr_map.empty() && type_map.empty())
281+
return false;
282+
277283
if(dest.has_subtype())
278284
if(have_to_rename(dest.subtype()))
279285
return true;

0 commit comments

Comments
 (0)