22 #define forall_symbolptr_list(it, list) \
23 for(symbolptr_listt::const_iterator it=(list).begin(); \
24 it!=(list).end(); ++it)
26 #define Forall_symbolptr_list(it, list) \
27 for(symbolptr_listt::iterator it=(list).begin(); \
28 it!=(list).end(); ++it)
32 const std::string &module,
40 symbol_tablet::symbolst::const_iterator it2=
41 symbol_table.
symbols.find(it->second);
43 if(it2==symbol_table.
symbols.end())
51 symbolptr_list.push_back(&s);
54 if(symbolptr_list.empty())
59 else if(symbolptr_list.size()>=2)
61 message.
error() <<
"module `" << module <<
"' does not uniquely resolve:\n";
64 message.
error() <<
" " << (*it)->name <<
'\n';
72 return *symbolptr_list.front();
77 const std::string &module,
86 for(
const auto &symbol_pair : symbol_table.
symbols)
88 const symbolt &s = symbol_pair.second;
97 symbolptr_list.push_back(&s);
100 if(symbolptr_list.empty())
105 else if(symbolptr_list.size()>=2)
108 std::set<std::string> modules;
111 modules.insert(
id2string((*it)->pretty_name));
113 message.
error() <<
"multiple modules found, please select one:\n";
115 for(
const auto &s_it : modules)
116 message.
error() <<
" " << s_it <<
'\n';
124 const symbolt &symbol=*symbolptr_list.front();