Speed up class_decl::find_base_class
authorDodji Seketeli <dodji@redhat.com>
Mon, 4 Jan 2016 14:36:54 +0000 (15:36 +0100)
committerDodji Seketeli <dodji@redhat.com>
Mon, 4 Jan 2016 18:58:01 +0000 (19:58 +0100)
commit54cb41a1065463eda75dff9ad828255832e5576e
treec67343987dbe1e6f20311244a71df0bb4da188ce
parentd50882bf4f21979f5ac992c183758786581459b3
Speed up class_decl::find_base_class

This is useful for big debug info data set.  Also, this function is
going to be used extensively in subsequent patch that fixes a base
class representation related issue.

* src/abg-ir.cc (class_decl::priv::bases_map_): New data member.
(class_decl::add_base_specifier): Add the new base specifier to
the new class_decl::priv::bases_map_ data member.
(class_decl::find_base_class): Use the new
class_decl::priv::bases_map_ data member to speed up finding the
base class.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-ir.cc