mirror of
git://sourceware.org/git/libabigail.git
synced 2025-03-05 06:07:49 +00:00
Insertion uses the canonical type, if available, but look-up did not. Given that type id insertion and look-up also use canonical types, it makes sense to adjust the remaining code accordingly. Neither decl_only_type_is_emitted nor record_decl_only_type_as_emitted do the check, but very few types end up being recorded this way. The functions write_class_decl and write_union_decl (but not write_class_decl_opening_tag and write_union_decl_opening_tag which can be called in other contexts) resolve declaration-only types to a definition where possible. To ensure type ids consistently refer to the same canonical type we should use canonical types and definitions-of-declarations more consistently. This change introduces get_exemplar_type to return the exemplar type that should be used for type id and emitted checks. That exemplar type is the canonical type of a given type, or the canonical type of the definition-of-declaration-only-type when applicable. However, it does not also change all the write functions to write out the exemplar types. * include/abg-fwd.h (get_exemplar_type): Declare new function. * src/abg-ir.cc (get_exemplar_type): Define new function. * src/abg-writer.cc (type_has_existing_id): use get_exemplar_type for resolution. (get_id_for_type): Likewise. (record_type_as_emitted): Likewise. (type_is_emitted): Likewise. Reviewed-by: Giuliano Procida <gprocida@google.com> Signed-off-by: Matthias Maennich <maennich@google.com> Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
abg-comp-filter.h | ||
abg-comparison.h | ||
abg-config.h | ||
abg-corpus.h | ||
abg-ctf-reader.h | ||
abg-cxx-compat.h | ||
abg-diff-utils.h | ||
abg-dwarf-reader.h | ||
abg-elf-reader-common.h | ||
abg-fwd.h | ||
abg-hash.h | ||
abg-ini.h | ||
abg-interned-str.h | ||
abg-ir.h | ||
abg-libxml-utils.h | ||
abg-reader.h | ||
abg-regex.h | ||
abg-reporter.h | ||
abg-sptr-utils.h | ||
abg-suppression.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-workers.h | ||
abg-writer.h | ||
Makefile.am |