@@ -26,12 +26,12 @@ static std::string type2name(
26
26
const namespacet &ns,
27
27
symbol_numbert &symbol_number);
28
28
29
- static std::string type2name_symbol (
30
- const typet &type,
29
+ static std::string type2name_tag (
30
+ const tag_typet &type,
31
31
const namespacet &ns,
32
32
symbol_numbert &symbol_number)
33
33
{
34
- const irep_idt &identifier= type.get (ID_identifier );
34
+ const irep_idt &identifier = type.get_identifier ( );
35
35
36
36
const symbolt *symbol;
37
37
@@ -91,7 +91,6 @@ static std::string pointer_offset_bits_as_string(
91
91
return integer2string (*bits);
92
92
}
93
93
94
- static bool parent_is_sym_check=false ;
95
94
static std::string type2name (
96
95
const typet &type,
97
96
const namespacet &ns,
@@ -193,17 +192,14 @@ static std::string type2name(
193
192
}
194
193
}
195
194
else if (
196
- type.id () == ID_symbol_type || type.id () == ID_c_enum_tag ||
197
- type.id () == ID_struct_tag || type. id () == ID_union_tag)
195
+ type.id () == ID_c_enum_tag || type.id () == ID_struct_tag ||
196
+ type.id () == ID_union_tag)
198
197
{
199
- parent_is_sym_check=true ;
200
- result+=type2name_symbol (type, ns, symbol_number);
198
+ result += type2name_tag (to_tag_type (type), ns, symbol_number);
201
199
}
202
200
else if (type.id ()==ID_struct ||
203
201
type.id ()==ID_union)
204
202
{
205
- assert (parent_is_sym_check);
206
- parent_is_sym_check=false ;
207
203
if (type.id ()==ID_struct)
208
204
result+=" ST" ;
209
205
if (type.id ()==ID_union)
@@ -277,13 +273,6 @@ static std::string type2name(
277
273
278
274
std::string type2name (const typet &type, const namespacet &ns)
279
275
{
280
- parent_is_sym_check=true ;
281
276
symbol_numbert symbol_number;
282
277
return type2name (type, ns, symbol_number);
283
278
}
284
-
285
- std::string type2name (const typet &type)
286
- {
287
- symbol_tablet symbol_table;
288
- return type2name (type, namespacet (symbol_table));
289
- }
0 commit comments