Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/util/std_expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,16 @@ struct_exprt::component(const irep_idt &name, const namespacet &ns) const
{
return ::component(*this, name, ns);
}

const exprt &object_descriptor_exprt::root_object() const
{
const exprt *p = &object();

while(p->id() == ID_member || p->id() == ID_index)
{
assert(!p->operands().empty());
p = &p->op0();
}

return *p;
}
13 changes: 1 addition & 12 deletions src/util/std_expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -1966,18 +1966,7 @@ class object_descriptor_exprt:public binary_exprt
return op0();
}

const exprt &root_object() const
{
const exprt *p=&object();

while(p->id()==ID_member || p->id()==ID_index)
{
assert(!p->operands().empty());
p=&p->op0();
}

return *p;
}
const exprt &root_object() const;

exprt &offset()
{
Expand Down