Go to the documentation of this file.
20 assert(symbol.
type.
id()==ID_struct);
23 std::map<irep_idt, std::map<irep_idt, exprt> > vt_value_maps;
27 for(std::size_t i=0; i < struct_type.
components().size(); i++)
42 std::map<irep_idt, exprt> &value_map =
43 vt_value_maps[class_id];
47 if(compo.
get_bool(ID_is_pure_virtual))
51 value_map[compo.
get(ID_virtual_name)] = e;
56 value_map[compo.
get(ID_virtual_name)] = address;
61 for(std::map<
irep_idt, std::map<irep_idt, exprt> >::const_iterator cit =
62 vt_value_maps.begin(); cit!=vt_value_maps.end(); cit++)
64 const std::map<irep_idt, exprt> &value_map=cit->second;
89 std::map<irep_idt, exprt>::const_iterator cit2 =
90 value_map.find(compo.get_base_name());
91 assert(cit2!=value_map.end());
92 const exprt &value=cit2->second;
93 assert(value.
type()==compo.type());
94 values.operands().push_back(value);
96 vt_symb_var.
value=values;
void do_virtual_table(const symbolt &symbol)
const componentst & components() const
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
const struct_typet & to_struct_type(const typet &type)
Cast a typet to a struct_typet.
#define CHECK_RETURN(CONDITION)
typet type
Type of symbol.
Base class for all expressions.
irep_idt base_name
Base (non-scoped) name.
A struct tag type, i.e., struct_typet with an identifier.
Expression to hold a symbol (variable)
const irep_idt & get(const irep_idt &name) const
Struct constructor from list of elements.
typet & type()
Return the type of the expression.
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
irep_idt mode
Language mode.
The null pointer constant.
const std::string & id2string(const irep_idt &d)
const irep_idt & get_name() const
static bool failed(bool error_indicator)
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
virtual std::pair< symbolt &, bool > insert(symbolt symbol) override
Author: Diffblue Ltd.
symbol_tablet & symbol_table
pointer_typet pointer_type(const typet &subtype)
const irep_idt & id() const
const parameterst & parameters() const
exprt value
Initial value of symbol.
Structure type, corresponds to C style structs.
source_locationt location
Source code location of definition of symbol.
const typet & base_type() const
The type of the data what we point to.
Operator to return the address of an object.
The pointer type These are both 'bitvector_typet' (they have a width) and 'type_with_subtypet' (they ...
irep_idt module
Name of module the symbol belongs to.
irep_idt name
The unique identifier.
bool get_bool(const irep_idt &name) const