Support updating a class in the abixml reader
In DWARF, the same class declaration can be present several times but
with different "views", that is, it can be present in a first
translation unit, but without any member type; then in a subsequent
translation unit, its member types are defined. In another, it'll be
completely defined, with all its data members and base classes. The
DWARF reader knows how to amend the class to add new members to it, as
they show up in the debug information.
This patch adds the same functionality to the abixml reader. The
writer has already started to write class declarations with different
"views" too, since it's started to avoid duplicating full class
definitions in every translation unit that uses them.
Without this patch, abixml misses some class members, and that is a
bug.
* include/abg-ir.h (class_decl::{find_base_class,
find_member_type, find_data_member}): Declare new member functions ..
* src/abg-ir.cc (class_decl::{find_base_class,
find_member_type, find_data_member}): ... and define them.
* src/abg-reader.cc (build_class_decl): Add the ability to update
a class to add new data members, member types and base classes to
it, if necessary.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>