Skip to content

Commit 6a12505

Browse files
author
Daniel Kroening
committed
replace_symbolt can now replace tag type symbols
1 parent d33bd22 commit 6a12505

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/util/replace_symbol.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,19 @@ bool replace_symbolt::replace(typet &dest) const
197197
result=false;
198198
}
199199
}
200+
else if(dest.id() == ID_union_tag ||
201+
dest.id() == ID_struct_tag ||
202+
dest.id() == ID_c_enum_tag)
203+
{
204+
type_mapt::const_iterator it =
205+
type_map.find(to_tag_type(dest).get_identifier());
206+
207+
if(it != type_map.end())
208+
{
209+
dest = it->second;
210+
result = false;
211+
}
212+
}
200213
else if(dest.id()==ID_array)
201214
{
202215
array_typet &array_type=to_array_type(dest);

0 commit comments

Comments
 (0)