23 if(type.
id() == ID_struct_tag)
27 else if(type.
id() == ID_struct)
29 const exprt &methods =
static_cast<const exprt &
>(type.
find(ID_methods));
31 for(
const auto &op : methods.
operands())
33 if(op.type().id() == ID_code)
43 if(arg_type.
id() != ID_pointer)
48 base_type.
id() == ID_struct_tag &&
51 const symbol_exprt symbol_expr(op.get(ID_name), op.type());
63 const std::list<irep_idt> &vars,
67 for(
const auto &
id : vars)
79 destructor.
arguments().push_back(this_expr);
pointer_typet pointer_type(const typet &subtype)
Operator to return the address of an object.
goto_instruction_codet representation of a function call statement.
const typet & return_type() const
const parameterst & parameters() const
Base class for all expressions.
const source_locationt & source_location() const
A generic container class for the GOTO intermediate representation of one function.
static instructiont make_dead(const symbol_exprt &symbol, const source_locationt &l=source_locationt::nil())
static instructiont make_function_call(const code_function_callt &_code, const source_locationt &l=source_locationt::nil())
Create a function call instruction.
targett add(instructiont &&instruction)
Adds a given instruction at the end.
const irept & find(const irep_idt &name) const
const irep_idt & id() const
const union_typet & follow_tag(const union_tag_typet &) const
Follow type tag of union type.
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)
source_locationt location
Source code location of definition of symbol.
class symbol_exprt symbol_expr() const
Produces a symbol_exprt for a symbol.
typet type
Type of symbol.
The type of an expression, extends irept.
code_function_callt get_destructor(const namespacet &ns, const typet &type)
void destruct_locals(const std::list< irep_idt > &vars, goto_programt &dest, const namespacet &ns)
const irept & get_nil_irep()
API to expression classes for Pointers.
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
const struct_tag_typet & to_struct_tag_type(const typet &type)
Cast a typet to a struct_tag_typet.