mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-22 01:40:12 +00:00
f95af3a89a
It turns that in some DWARF (e.g, from the r300_dri.so binary in bug libabigail/19024) the same class Foo can be declared as a struct, and later defined as a class. Or the other way around. In some cases, Foo can be declared as a struct, have a member type Foo::Type with no access specifier, and later that member type is still present with no access specifier when Foo is defined as a class. So when comparing Foo::Type (from struct Foo) against Foo::Type (from class Foo) we must not consider the access specification of Type, otherwise, as in the first case it's 'public' and in the second case it's 'private', the two member types would be considered different. And something similar happens for member function declarations too. This patch thus avoids comparing access specifiers for member types and functions. Though it can be considered as a regression compared to what was being done before, access specifiers don't have an impact on ABI per se. And they can cause noise in the result, as we are seeing here. * include/abg-fwd.h (is_function_decl): Declare a new overload. * src/abg-ir.cc (is_function_decl): Define a new overload. (equals): In the overload for decl_base, do not compare access specifiers when comparing member functions and types. * tests/data/test-diff-dwarf/test0-report.txt: Adjust. * tests/data/test-diff-filter/test0-report.txt: Likewise. * tests/data/test-diff-filter/test01-report.txt: Likewise. * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Likewise. * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt: Likewise. * tests/data/test-diff-filter/test4-report.txt: Likewise. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
24 lines
790 B
Plaintext
24 lines
790 B
Plaintext
Functions changes summary: 0 Removed, 1 Changed, 1 Added functions
|
|
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
|
|
|
|
1 Added function:
|
|
|
|
'method int S0::get_member0()'
|
|
|
|
1 function with some indirect sub-type change:
|
|
|
|
[C]'function void foo(S0&, S1*)' has some indirect sub-type changes:
|
|
parameter 1 of type 'S0&' has sub-type changes:
|
|
in referenced type 'class S0':
|
|
type size changed from 96 to 128 bits
|
|
1 base class change:
|
|
'class B0S0' changed:
|
|
type size changed from 64 to 96 bits
|
|
1 data member insertion:
|
|
'unsigned int B0S0::m2', at offset 64 (in bits)
|
|
|
|
1 data member change:
|
|
'int S0::m0' offset changed from 64 to 96 (in bits), access changed from 'private' to 'protected'
|
|
|
|
|