26 dest.insert(symbol.
name);
33 if(symbol.
type.
id()==ID_code)
38 for(code_typet::parameterst::const_iterator
39 it=parameters.begin();
47 new_symbols.insert(
id);
51 for(find_symbols_sett::const_iterator
52 it=new_symbols.begin();
53 it!=new_symbols.end();
56 if(dest.find(*it)==dest.end())
81 special.insert(
"argc'");
82 special.insert(
"argv'");
83 special.insert(
"envp'");
84 special.insert(
"envp_size'");
92 for(symbol_tablet::symbolst::const_iterator
93 it=symbol_table.
symbols.begin();
98 if(exported.find(it->first)!=exported.end())
102 const symbolt &symbol=it->second;
104 if(special.find(symbol.
name)!=special.end())
110 bool is_function=symbol.
type.
id()==ID_code;
114 bool has_initializer=
119 if(symbol.
mode==ID_C && is_function && is_file_local)
142 if((has_initializer || !symbol.
is_extern) &&
151 for(symbol_tablet::symbolst::iterator
152 it=symbol_table.
symbols.begin();
153 it!=symbol_table.
symbols.end();
156 if(exported.find(it->first)==exported.end())
158 symbol_tablet::symbolst::iterator next=it;
160 symbol_table.
symbols.erase(it);
irep_idt name
The unique identifier.
virtual bool lookup(const irep_idt &name, const symbolt *&symbol) const
irep_idt mode
Language mode.
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
std::unordered_set< irep_idt, irep_id_hash > find_symbols_sett
const irep_idt & id() const
void remove_internal_symbols(symbol_tablet &symbol_table)
A symbol is EXPORTED if it is a * non-static function with body that is not extern inline * symbol us...
typet type
Type of symbol.
const parameterst & parameters() const
const code_typet & to_code_type(const typet &type)
Cast a generic typet to a code_typet.
const char * c_str() const
void find_type_and_expr_symbols(const exprt &src, find_symbols_sett &dest)
Remove symbols that are internal only.
const typet & return_type() const
void get_symbols_rec(const namespacet &ns, const symbolt &symbol, find_symbols_sett &dest)