19 std::unordered_set<irep_idt> &address_taken)
24 if(src.
id()==ID_address_of &&
25 src.
type().
id()==ID_pointer &&
30 if(op.id()==ID_symbol)
38 std::unordered_set<irep_idt> &address_taken)
43 if(src.
type().
id()==ID_code &&
51 std::unordered_set<irep_idt> &address_taken)
63 std::unordered_set<irep_idt> &address_taken)
70 std::unordered_set<irep_idt>
73 std::unordered_set<irep_idt> address_taken;
79 std::unordered_set<irep_idt>
82 std::unordered_set<irep_idt> working_queue;
83 std::unordered_set<irep_idt> functions;
88 while(!working_queue.empty())
91 working_queue.erase(working_queue.begin());
93 if(!functions.insert(
id).second)
96 const goto_functionst::function_mapt::const_iterator f_it=
109 if(i_it->is_function_call())
122 std::unordered_set<irep_idt>
void compute_functions(const exprt &src, std::unordered_set< irep_idt > &address_taken)
get all functions in the expression
void compute_address_taken_functions(const exprt &src, std::unordered_set< irep_idt > &address_taken)
get all functions whose address is taken
std::unordered_set< irep_idt > compute_called_functions(const goto_functionst &goto_functions)
computes the functions that are (potentially) called
function_mapt function_map
const irep_idt & id() const
API to expression classes.
#define forall_operands(it, expr)
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast a generic exprt to a symbol_exprt.
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
A generic container class for the GOTO intermediate representation of one function.
static irep_idt entry_point()
Base class for all expressions.
goto_programt & goto_program
const typet & subtype() const
#define forall_goto_functions(it, functions)
#define forall_goto_program_instructions(it, program)
goto_functionst goto_functions
GOTO functions.
const code_function_callt & to_code_function_call(const codet &code)