]> sourceware.org Git - libabigail.git/commit
ir: Make pointers name stable wrt decl-only-ness of pointed-to types
authorDodji Seketeli <dodji@redhat.com>
Tue, 19 Jul 2022 15:28:28 +0000 (17:28 +0200)
committerDodji Seketeli <dodji@redhat.com>
Tue, 19 Jul 2022 16:47:56 +0000 (18:47 +0200)
commit8b358c57bb0c010a42db271c3ca80a7548cb184e
tree9204ac064c409544121dc3804c5968e4136d444d
parentf001c14eee413d71b5b09097a6e9d6a362570d63
ir: Make pointers name stable wrt decl-only-ness of pointed-to types

When emitting the pretty representation of pointers from the IR, it
can so happen that the pointed type is a decl-only type which has been
resolved to a definition.  In that case, the decl-only type might be
anonymous while the definition has a naming typedef, effectively
giving it a name.  Then, using the decl-only type to construct the
name of the type might yield a different type name, more precisely,
the internal "anonymous" name of that type.  This can lead to several
types having the same anonymous name, leading to instability with
respect to sorting.

The patch just looks through the decl-only pointed-to types before
using their name to construct the name of the pointer type.  The patch
does that for reference types as well.

* src/abg-ir.cc (look_through_decl_only): New overload for
type_base.
* tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Adjust.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-ir.cc
tests/data/test-read-dwarf/PR22122-libftdc.so.abi
This page took 0.033775 seconds and 5 git commands to generate.