コード例 #1
0
  void compute_address_taken_in_symbols(
    std::set<irep_idt> &address_taken)
  {
    const symbol_tablet &symbol_table=ns.get_symbol_table();

    for(const auto &s : symbol_table.symbols)
      compute_address_taken_functions(s.second.value, address_taken);
  }
コード例 #2
0
  void compute_address_taken_in_symbols(
    std::set<irep_idt> &address_taken)
  {
    const symbol_tablet &symbol_table=ns.get_symbol_table();

    const symbol_tablet::symbolst &s=symbol_table.symbols;

    for(symbol_tablet::symbolst::const_iterator
        it=s.begin(); it!=s.end(); ++it)
      compute_address_taken_functions(it->second.value, address_taken);
  }
コード例 #3
0
remove_function_pointerst::remove_function_pointerst(
  symbol_tablet &_symbol_table,
  bool _add_safety_assertion,
  const goto_functionst &goto_functions):
  ns(_symbol_table),
  symbol_table(_symbol_table),
  add_safety_assertion(_add_safety_assertion)
{
  compute_address_taken_in_symbols(address_taken);
  compute_address_taken_functions(goto_functions, address_taken);

  // build type map
  forall_goto_functions(f_it, goto_functions)
    type_map[f_it->first]=f_it->second.type;
}
コード例 #4
0
remove_function_pointerst::remove_function_pointerst(
  message_handlert &_message_handler,
  symbol_tablet &_symbol_table,
  bool _add_safety_assertion, bool only_resolve_const_fps,
  const goto_functionst &goto_functions):
  messaget(_message_handler),
  ns(_symbol_table),
  symbol_table(_symbol_table),
  add_safety_assertion(_add_safety_assertion),
  only_resolve_const_fps(only_resolve_const_fps)
{
  compute_address_taken_in_symbols(address_taken);
  compute_address_taken_functions(goto_functions, address_taken);

  // build type map
  forall_goto_functions(f_it, goto_functions)
    type_map[f_it->first]=f_it->second.type;
}
コード例 #5
0
remove_function_pointerst::remove_function_pointerst(
  symbol_tablet &_symbol_table,
  bool _add_safety_assertion,
  const goto_functionst &goto_functions):
  ns(_symbol_table),
  symbol_table(_symbol_table),
  add_safety_assertion(_add_safety_assertion)
{
  compute_address_taken_in_symbols(address_taken);
  compute_address_taken_functions(goto_functions, address_taken);

  // build type map
  for(goto_functionst::function_mapt::const_iterator f_it=
      goto_functions.function_map.begin();
      f_it!=goto_functions.function_map.end();
      f_it++)
    type_map[f_it->first]=f_it->second.type;
}