]> sourceware.org Git - libabigail.git/commit
ir: Disambiguate sorting of array element types
authorDodji Seketeli <dodji@redhat.com>
Fri, 22 Jul 2022 07:56:17 +0000 (09:56 +0200)
committerDodji Seketeli <dodji@redhat.com>
Fri, 22 Jul 2022 23:22:41 +0000 (01:22 +0200)
commitc496019a387b6e9066048151cabb2eb2dfc24ce3
tree04b3e3d9e085dbaae4764397d08e1938e55bf863
parent8b358c57bb0c010a42db271c3ca80a7548cb184e
ir: Disambiguate sorting of array element types

When using non-internal pretty representation of array types (e.g, for
sorting of types in a given scope for the purpose of serialization),
some array element types might have the same name, even though they
don't have the same qualified name.  In those cases, the serialized
abixml output is not stable.

This patches uses qualified names for array element names for type
sorting purposes.

However, this patch uncovers a problem that shows up in the tests
outputs for test-abidiff-exit and test-diff-filter, where emitting
qualified names of qualified types shows that there can be redundant
qualifiers in the serialized output.  This issue will be fixed
separately in a later commit.  For now, the output of these tests is
temporarily updated to have the tests pass.

* src/abg-ir.cc (get_type_representation): In the overload for
array_type_def, use qualified names for element types.
* tests/data/test-abidiff-exit/qualifier-typedef-array-report-1.txt: Adjust.
* tests/data/test-annotate/test15-pr18892.so.abi: Adjust.
* tests/data/test-annotate/test17-pr19027.so.abi: Adjust.
* tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
Adjust.
* tests/data/test-diff-filter/test-PR26739-2-report-0.txt: Adjust.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-ir.cc
tests/data/test-abidiff-exit/qualifier-typedef-array-report-1.txt
tests/data/test-annotate/test15-pr18892.so.abi
tests/data/test-annotate/test17-pr19027.so.abi
tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi
tests/data/test-diff-filter/test-PR26739-2-report-0.txt
This page took 0.036829 seconds and 5 git commands to generate.