mirror of
git://sourceware.org/git/libabigail.git
synced 2025-01-13 04:41:28 +00:00
34b94a06da
When the the of 'equals' overloaded functions was introduced, it was to get the possibility to have a hint about the kind of difference (local or sub-type difference) there was between two different ABI artifacts. To do that, it was quite common to keep on comparing the two artifacts even when we knew there were different, because we need to know all the kinds of the differences there are. Now, profiling shows that doing this generally is too costly. So, this patch adds a way to doing it only when necessary. * include/abg-ir.h (equal): Turn the last parameter of type change_kind& into a change_kind*. Do this on all the overloads' declarations. * src/abg-ir.cc (equal): Do the same for the definitions of the overloads and adapt them to report about the kind of changes makes the two ABI artifact different -- only if the change_kind pointer is non-null. That way, callers have a way to choose if they want to go the expensive route of knowing what kind of changes there are. ({decl_base, scope_decl, type_base, scope_type_decl, qualified_type_def, pointer_type_def, pointer_type_def, reference_type_def, array_type_def, enum_type_decl, typedef_decl, var_decl, function_type, function_decl, function_decl::parameter, class_decl::base_spec, class_decl}::operator==): Adjust to the new signature of equals; call it with the change_kind* parameter set to NULL. * src/abg-comparison.cc ({var_diff, pointer_diff, array_diff, reference_diff, qualified_type_diff, enum_diff, class_diff, base_diff, scope_diff, fn_parm_diff, function_decl_diff, type_decl_diff, typedef_diff}::has_local_changes): Adjust. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
abg-comp-filter.h | ||
abg-comparison.h | ||
abg-config.h | ||
abg-corpus.h | ||
abg-diff-utils.h | ||
abg-dwarf-reader.h | ||
abg-fwd.h | ||
abg-hash.h | ||
abg-ini.h | ||
abg-ir.h | ||
abg-libxml-utils.h | ||
abg-libzip-utils.h | ||
abg-reader.h | ||
abg-sptr-utils.h | ||
abg-tools-utils.h | ||
abg-traverse.h | ||
abg-version.h.in | ||
abg-viz-common.h | ||
abg-viz-dot.h | ||
abg-viz-svg.h | ||
abg-writer.h | ||
Makefile.am |