* include/abg-ir.h ({decl_base, class_decl,
function_decl}::get_pretty_representation): New virtual member to
get a pretty string name for decls & types.
(class_decl::parameter): Add an index to the parameter type.
(class_decl::parameter::parameter): Update the constructor for the
change above.
(class_decl::parameter::{get_index, set_index}): Accessors for the
new index.
(class_decl::parameter::operator==): Take in account the index.
(function_type::append_parameter): Set the index of the parameter
here.
* include/abg-fwd.h (get_type_name): New declaration.
* src/abg-ir.cc (get_type_name): New definition.
({decl_base, function_decl,
class_decl}::get_pretty_representation): New implementations.
(method_type::set_class_type): Update this to set function
parameter's index by default.
(function_decl::append_parameters): Use the append_parameter
method from function_type.
* include/abg-comparison.h (class function_decl_diff): New type
declaration.
* src/abg-comparison.cc (compute_diff_for_decls, compute_diff):
New definitions.
({pointer_diff, class_diff, scope_diff}::report): Use the new
get_pretty_representation. Output a prettier report.
(function_decl_diff::priv): New type.
(function_decl_diff::{deleted_parameter_at, inserted_parameter_at,
ensure_lookup_tables_populated, function_decl_diff,
first_function_decl, second_function_decl, changed_parms,
removed_parms, added_parms, length, report}): New member function
definitions.
* src/abg-hash.cc (function_decl::parameter::hash): Update this to
take the index in account.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* include/abg-ir.h: Add author. Remove many useless white
spaces. Add missing end-of-class comments. Move function
declaration comments from here to their definition point.
* include/abg-fwd.h: Remove useless indentation. Also move
doxygen comments to *definition* points in src/abg-ir.cc.
* src/abg-ir.cc: Remove many useless white spaces. Move comments
from declaration points to here.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* include/abg-fwd.h (node_visitor_base): Renamed ir_node_visitor
into this.
* include/abg-traverse.h (struct node_visitor_base): New base for
the visitors.
(struct traversable_base): Update comments.
(traversable_base::traverse): Change this into non-pure virtual.
Make it take a reference to node_visitor_base, rather than a
reference to ir_node_visitor.
* src/abg-traverse.cc (traversable_base::traverse): New empty
default implementation.
* include/abg-ir.h: Make ir_node_visitor inherit from new
node_visitor_base.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* include/abg-fwd.h: Move location, location_manager and
translation_unit in the ir section. Remove stuff that was
commented out anyway.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>