Skip to content

Commit 66fd36f

Browse files
committed
Typedef names are symbols
remove_internal_symbols must get to see typedef names so as not to remove type symbols that constitute typedef names. Follow-up to 99067de
1 parent dbe9f09 commit 66fd36f

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/goto-cc/compile.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,7 @@ void compilet::convert_symbols(goto_functionst &dest)
714714

715715
if(s_it->second.type.id()==ID_code &&
716716
!s_it->second.is_macro &&
717+
!s_it->second.is_type &&
717718
s_it->second.value.id()!="compiled" &&
718719
s_it->second.value.is_not_nil())
719720
{

src/goto-programs/read_goto_binary.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ static bool link_functions(
302302
rename_symbolt macro_application;
303303

304304
forall_symbols(it, dest_symbol_table.symbols)
305-
if(it->second.is_macro)
305+
if(it->second.is_macro && !it->second.is_type)
306306
{
307307
const symbolt &symbol=it->second;
308308

src/util/find_symbols.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ void find_symbols(kindt kind, const typet &src, find_symbols_sett &dest)
124124

125125
forall_subtypes(it, src)
126126
find_symbols(kind, *it, dest);
127+
128+
const irep_idt &typedef_name=src.get(ID_C_typedef);
129+
if(!typedef_name.empty())
130+
dest.insert(typedef_name);
127131
}
128132

129133
if(src.id()==ID_struct ||

0 commit comments

Comments
 (0)