mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-17 15:34:34 +00:00
Avoid unnecessary updates to type lookup maps
In class_or_union::set_is_declaration_only we should update the type lookup maps only when a class type that was previously a declaration-only type is now a defined type. Otherwise, updating the type lookup maps is unnecessary and profiling shows that it takes a significant amount of time. This patch does away with the unnecessary attempts to update type lookup maps. * src/abg-ir.cc (class_or_union::get_is_declaration_only): Try to update the type maps only when a declaration-only class type is now defined. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
7c004d6922
commit
b8452d2d59
@ -14669,15 +14669,18 @@ class_or_union::get_is_declaration_only() const
|
||||
void
|
||||
class_or_union::set_is_declaration_only(bool f)
|
||||
{
|
||||
bool update_types_lookup_map = !f && priv_->is_declaration_only_;
|
||||
|
||||
priv_->is_declaration_only_ = f;
|
||||
if (!f)
|
||||
|
||||
if (update_types_lookup_map)
|
||||
if (scope_decl* s = get_scope())
|
||||
{
|
||||
declarations::iterator i;
|
||||
if (s->find_iterator_for_member(this, i))
|
||||
maybe_update_types_lookup_map(*i);
|
||||
else
|
||||
abort();
|
||||
ABG_ASSERT_NOT_REACHED;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user