* configure.ac: Add libxml2 dependencies.
* src/abg-corpus.{h,cc}: New files.
* src/abg-hash.{h,cc}: Likewise.
* src/abg-libxml-utils.{h,cc}: Likewise.
* src/abg-reader.{h,cc}: Likewise.
* src/abg-serialize.{h,cc}: Likewise.
* src/abg-writer.h: Likewise.
* src/Makefile.am: Build the new files above.
* src/abg-ir.h (class location): Add public accessors for the value, and
a truth operator. Make the methods be inline.
(class decl_base): Renamed decl into this. Renamed what_decl_kind
into what_kind. Renamed get_context into get_scope. Add virtual
destructor, accessors for location and name.
(class {scope_decl, type_base, type_decl} ): Add virtual dtor.
Re-style.
(struct {decl_base_hash, type_decl_hash}): New hashing functors.
(class {scope_type_decl, namespace_decl}): Add virtual dtor.
* src/abg-ir.cc (location::*): Remove location definitions. There
are now inline in the header.
(class decl_base): Renamed decl into this. Remove most of the
definitions from here as their are now inline in the header.
(scope_decl::~scope_decl, type_base::~type_base)
(type_decl::~type_decl, scope_type_decl::~scope_type_decl): New
definitions.
* src/abg-ir.h (location): Make the default ctor public.
(class decl): Declare data member and proper constructors. Make the
context be a shared_ptr. Add a kind data member to avoid RTTI for
now.
(class scope_decl): Added protected constructor to handle the kind data
member.
(class type_base): Add data members proper and clean the iface up.
(class type_decl, scope_type_decl, namespace_decl): Iron out
constructors.
* src/abg-ir.cc (class location): Fix style.
(class decl, scope_decl, type_base, type_decl, scope_type_decl)
(namespace_decl): Define these types.