libabigail/include
Dodji Seketeli 0239f89b4f ir: Really avoid canonicalizing decl-only classes
is_non_canonicalized_type uses is_declaration_only_class_or_union_type
to detect decl-only classes, but it doesn't differentiate between
decl-only classes that are associated to a class definition and those
that are not.

We want to avoid canonicalizing decl-only classes that are not
associated to any class definition.

This patch fixes the invocation of
is_declaration_only_class_or_union_type to express the above
assertion.

This fix uncovered another self-comparison issue that was being
expressed when running the command below:

    $ abidw --abidiff tests/data/test-types-stability/PR27086-libstdc++.so.6.0.26

That one was due to an error in method_decl::set_linkage_name which
was making classes contain the wrong overloads of methods.  The patch
fixes that error too.

	* include/abg-fwd.h (is_pointer_to_decl_only_class_or_union_type)
	(is_reference_to_decl_only_class_or_union_type)
	(is_typedef_to_decl_only_class_or_union_type): Remove declarations.
	(is_typedef_ptr_or_ref_to_decl_only_class_or_union_type): Declare
	new function.
	* src/abg-ir.cc (is_pointer_to_decl_only_class_or_union_type)
	(is_reference_to_decl_only_class_or_union_type)
	(is_typedef_to_decl_only_class_or_union_type): Remove definitions.
	(is_typedef_ptr_or_ref_to_decl_only_class_or_union_type): Define
	new function.
	(is_non_canonicalized_type): Change the invocation of
	is_declaration_only_class_or_union_type to make it look through
	decl-only types.  Use
	is_typedef_ptr_or_ref_to_decl_only_class_or_union_type in lieu of
	is_{pointer,reference,typedef}_to_decl_only_class_or_union_type
	that got removed.
	(method_decl::set_linkage_name): Remove the mapping between the
	method and the old linkage name, only if the old name is different
	from the new name.  Duh.
	* tests/data/test-annotate/libtest23.so.abi: Adjust.
	* tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
	* tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
	* tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
	Likewise.
	* tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
	Likewise.
	* tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
	Likewise.
	* tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
	* tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi:
	Likewise.
	* tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
	* tests/data/test-read-dwarf/PR25007-sdhci.ko.abi: Likewise.
	* tests/data/test-read-dwarf/libtest23.so.abi: Likewise.
	* tests/data/test-read-dwarf/test-libaaudio.so.abi: Likewise.
	* tests/data/test-read-dwarf/test-libandroid.so.abi: Likewise.
	* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
	* tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
	* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
	* tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
	* tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
	* tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
	* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
	Likewise.
	* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
	Likewise.
	* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
	Likewise.
	* tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
	* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
	Likewise.
	* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2023-09-07 15:23:38 +02:00
..
abg-btf-reader.h Update the copyright notice for the BTF reader 2023-01-06 21:40:44 +01:00
abg-comp-filter.h Bug 29811 - Better categorize harmless unknown array size changes 2023-01-01 18:21:56 +01:00
abg-comparison.h Bug 29340 - Add support for Ada range types 2023-03-31 23:14:01 +02:00
abg-config.h Update copyright year for 2023 2023-01-01 18:19:30 +01:00
abg-corpus.h corpus,tools-utils: Support loading a corpus, its deps & other binaries 2023-07-07 13:34:39 +02:00
abg-ctf-reader.h Update copyright year for 2023 2023-01-01 18:19:30 +01:00
abg-cxx-compat.h Update copyright year for 2023 2023-01-01 18:19:30 +01:00
abg-diff-utils.h Update copyright year for 2023 2023-01-01 18:19:30 +01:00
abg-dwarf-reader.h Update copyright year for 2023 2023-01-01 18:19:30 +01:00
abg-elf-based-reader.h Make fe_iface::initialize independent from the kind of interface 2023-07-07 13:34:15 +02:00
abg-elf-reader.h Make fe_iface::initialize independent from the kind of interface 2023-07-07 13:34:15 +02:00
abg-fe-iface.h Make fe_iface::initialize independent from the kind of interface 2023-07-07 13:34:15 +02:00
abg-fwd.h ir: Really avoid canonicalizing decl-only classes 2023-09-07 15:23:38 +02:00
abg-hash.h Update copyright year for 2023 2023-01-01 18:19:30 +01:00
abg-ini.h Update copyright year for 2023 2023-01-01 18:19:30 +01:00
abg-interned-str.h Update copyright year for 2023 2023-01-01 18:19:30 +01:00
abg-ir.h operator!= fixes for C++-20 2023-09-07 15:22:44 +02:00
abg-libxml-utils.h Update copyright year for 2023 2023-01-01 18:19:30 +01:00
abg-reader.h Update copyright year for 2023 2023-01-01 18:19:30 +01:00
abg-regex.h Update copyright year for 2023 2023-01-01 18:19:30 +01:00
abg-reporter.h Bug 29340 - Add support for Ada range types 2023-03-31 23:14:01 +02:00
abg-sptr-utils.h Update copyright year for 2023 2023-01-01 18:19:30 +01:00
abg-suppression.h Misc white space fixes 2023-03-02 18:31:43 +01:00
abg-tools-utils.h abipkgdiff: Initialize libxml2 to use it in a multi-thread context 2023-09-07 15:23:38 +02:00
abg-traverse.h Update copyright year for 2023 2023-01-01 18:19:30 +01:00
abg-version.h.in abidw: Add --abixml-version 2021-11-12 18:31:28 +01:00
abg-viz-common.h Update copyright year for 2023 2023-01-01 18:19:30 +01:00
abg-viz-dot.h Update copyright year for 2023 2023-01-01 18:19:30 +01:00
abg-viz-svg.h Update copyright year for 2023 2023-01-01 18:19:30 +01:00
abg-workers.h Update copyright year for 2023 2023-01-01 18:19:30 +01:00
abg-writer.h Update copyright year for 2023 2023-01-01 18:19:30 +01:00
Makefile.am Add support for BTF 2023-01-06 21:05:53 +01:00