34 const std::string &name_prefix,
35 const std::string &basename_prefix,
41 irep_idt identifier = basename_prefix;
42 std::size_t prefix_size = 0;
43 if(!name_prefix.empty())
45 identifier = name_prefix +
"::" + basename_prefix;
46 prefix_size = name_prefix.
size() + 2;
49 std::string basename =
id2string(identifier).substr(prefix_size);
53 new_symbol.
location = source_location;
54 std::pair<symbolt &, bool> res = symbol_table.
insert(std::move(new_symbol));
73 const std::string &name_prefix,
74 const std::string &basename_prefix,
Internally generated symbol table entryThis is a symbol generated as part of translation to or modifi...
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
The symbol table base class interface.
virtual std::pair< symbolt &, bool > insert(symbolt symbol)=0
Move or copy a new symbol to the symbol table.
irep_idt base_name
Base (non-scoped) name.
source_locationt location
Source code location of definition of symbol.
The type of an expression, extends irept.
symbolt & get_fresh_aux_symbol(const typet &type, const std::string &name_prefix, const std::string &basename_prefix, const source_locationt &source_location, const irep_idt &symbol_mode, const namespacet &ns, symbol_table_baset &symbol_table)
Installs a fresh-named symbol with respect to the given namespace ns with the requested name pattern ...
Fresh auxiliary symbol creation.
const std::string & id2string(const irep_idt &d)
irep_idt get_new_name(const irep_idt &name, const namespacet &ns, char delimiter)
Build and identifier not yet present in the namespace ns based on name.
#define CHECK_RETURN(CONDITION)