27 dest.insert(symbol.
name);
34 if(symbol.
type.
id()==ID_code)
39 for(code_typet::parameterst::const_iterator
40 it=parameters.begin();
48 new_symbols.insert(
id);
52 for(find_symbols_sett::const_iterator
53 it=new_symbols.begin();
54 it!=new_symbols.end();
57 if(dest.find(*it)==dest.end())
83 special.insert(
"argc'");
84 special.insert(
"argv'");
85 special.insert(
"envp'");
86 special.insert(
"envp_size'");
94 for(symbol_tablet::symbolst::const_iterator
95 it=symbol_table.
symbols.begin();
100 if(exported.find(it->first)!=exported.end())
104 const symbolt &symbol=it->second;
106 if(special.find(symbol.
name)!=special.end())
112 bool is_function=symbol.
type.
id()==ID_code;
116 bool has_initializer=
121 if(symbol.
mode==ID_C && is_function && is_file_local)
144 if((has_initializer || !symbol.
is_extern) &&
153 for(symbol_tablet::symbolst::const_iterator
154 it=symbol_table.
symbols.begin();
155 it!=symbol_table.
symbols.end();
158 if(exported.find(it->first)==exported.end())
160 symbol_tablet::symbolst::const_iterator next=std::next(it);
161 symbol_table.
erase(it);
irep_idt name
The unique identifier.
irep_idt mode
Language mode.
const code_typet & to_code_type(const typet &type)
Cast a generic typet to a code_typet.
std::vector< parametert > parameterst
exprt value
Initial value of symbol.
Symbol table entry.This is a symbol in the symbol table, stored in an object of type symbol_tablet...
bool get_bool(const irep_namet &name) const
const irep_idt & id() const
void remove_internal_symbols(symbol_tablet &symbol_table)
Removes internal symbols from a symbol table A symbol is EXPORTED if it is a.
#define INITIALIZE_FUNCTION
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
virtual void erase(const symbolst::const_iterator &entry) override
Remove a symbol from the symbol table.
typet type
Type of symbol.
const parameterst & parameters() const
const char * c_str() const
void find_type_and_expr_symbols(const exprt &src, find_symbols_sett &dest)
std::unordered_set< irep_idt > find_symbols_sett
Remove symbols that are internal only.
const typet & return_type() const
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See namespace_baset::lookup().
void get_symbols_rec(const namespacet &ns, const symbolt &symbol, find_symbols_sett &dest)