37 if(symbol.
type.
id()==ID_pointer)
43 new_symbol.is_lvalue=
true;
44 new_symbol.module=symbol.
module;
46 new_symbol.type.set(ID_C_is_failed_symbol,
true);
48 symbol.
type.
set(ID_C_failed_symbol, new_symbol.name);
50 if(new_symbol.type.id()==ID_pointer)
53 symbol_table.
insert(std::move(new_symbol));
82 std::list<const symbolt *> symbol_list;
83 for(
auto &named_symbol : symbol_table.
symbols)
84 symbol_list.push_back(&(named_symbol.second));
86 for(
const symbolt *symbol : symbol_list)
90 std::optional<symbol_exprt>
void add_failed_symbol_if_needed(const symbolt &symbol, symbol_table_baset &symbol_table)
Create a failed-dereference symbol for the given base symbol if it is pointer-typed,...
void add_failed_symbols(symbol_table_baset &symbol_table)
Create a failed-dereference symbol for all symbols in the given table that need one (i....
std::optional< symbol_exprt > get_failed_symbol(const symbol_exprt &expr, const namespacet &ns)
Get the failed-dereference symbol for the given symbol.
void add_failed_symbol(symbolt &symbol, symbol_table_baset &symbol_table)
Create a failed-dereference symbol for the given base symbol if it is pointer-typed; if not,...
irep_idt failed_symbol_id(const irep_idt &id)
Get the name of the special symbol used to denote an unknown referee pointed to by a given pointer-ty...
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
const irep_idt & get(const irep_idt &name) const
void set(const irep_idt &name, const irep_idt &value)
const irep_idt & id() const
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
const typet & base_type() const
The type of the data what we point to.
Expression to hold a symbol (variable)
The symbol table base class interface.
symbolt & get_writeable_ref(const irep_idt &name)
Find a symbol in the symbol table for read-write access.
const symbolst & symbols
Read-only field, used to look up symbols given their names.
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.
irep_idt module
Name of module the symbol belongs to.
typet type
Type of symbol.
irep_idt name
The unique identifier.
irep_idt mode
Language mode.
const std::string & id2string(const irep_idt &d)
API to expression classes for Pointers.
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
API to expression classes.