mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-15 22:44:41 +00:00
Fix var_diff length determination
* src/abg-comparison.cc (var_diff::length): Just compare the two diff subjects. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
9291712259
commit
e55a7e3397
@ -1185,19 +1185,7 @@ var_diff::type_diff() const
|
||||
/// @return the length of the current diff.
|
||||
unsigned
|
||||
var_diff::length() const
|
||||
{
|
||||
unsigned l = 0;
|
||||
|
||||
var_decl_sptr f = first_var(), s = second_var();
|
||||
if (f->get_binding() != s->get_binding())
|
||||
++l;
|
||||
l += diff_length_of_decl_bases(f, s);
|
||||
|
||||
diff_sptr d = compute_diff(f->get_type(), s->get_type(), context());
|
||||
l += d->length();
|
||||
|
||||
return l;
|
||||
}
|
||||
{return *first_var() != *second_var();}
|
||||
|
||||
/// Report the diff in a serialized form.
|
||||
///
|
||||
|
@ -113,6 +113,11 @@ data/test-diff-dwarf/test0-v0.o \
|
||||
data/test-diff-dwarf/test0-v1.cc \
|
||||
data/test-diff-dwarf/test0-v1.o \
|
||||
data/test-diff-dwarf/test0-report.txt \
|
||||
data/test-diff-dwarf/test1-v0.cc \
|
||||
data/test-diff-dwarf/test1-v0.o \
|
||||
data/test-diff-dwarf/test1-v1.cc \
|
||||
data/test-diff-dwarf/test1-v1.o \
|
||||
data/test-diff-dwarf/test1-report.txt \
|
||||
\
|
||||
data/test-read-dwarf/test0 \
|
||||
data/test-read-dwarf/test0.abi \
|
||||
|
17
tests/data/test-diff-dwarf/test1-report.txt
Normal file
17
tests/data/test-diff-dwarf/test1-report.txt
Normal file
@ -0,0 +1,17 @@
|
||||
Functions changes summary: 0 Removed, 1 Changed, 0 Added function
|
||||
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
|
||||
|
||||
1 function with some indirect sub-type change:
|
||||
|
||||
[C]'function void foo(const S&)' has some indirect sub-type changes:
|
||||
parameter 0 of type 'const S&' changed:
|
||||
in unqualified underlying type 'S&':
|
||||
in referenced type 'struct S':
|
||||
size changed from 64 to 96 bits
|
||||
1 data member change:
|
||||
'int S::m1' offset changed from 32 to 64
|
||||
|
||||
1 data member insertion:
|
||||
'unsigned int S::m01', at offset 32 (in bits)
|
||||
|
||||
|
BIN
tests/data/test-diff-dwarf/test1-v0.o
Normal file
BIN
tests/data/test-diff-dwarf/test1-v0.o
Normal file
Binary file not shown.
BIN
tests/data/test-diff-dwarf/test1-v1.o
Normal file
BIN
tests/data/test-diff-dwarf/test1-v1.o
Normal file
Binary file not shown.
@ -62,6 +62,12 @@ InOutSpec in_out_specs[] =
|
||||
"data/test-diff-dwarf/test0-report.txt",
|
||||
"output/test-diff-dwarf/test0-report.txt"
|
||||
},
|
||||
{
|
||||
"data/test-diff-dwarf/test1-v0.o",
|
||||
"data/test-diff-dwarf/test1-v1.o",
|
||||
"data/test-diff-dwarf/test1-report.txt",
|
||||
"output/test-diff-dwarf/test1-report.txt"
|
||||
},
|
||||
// This should be the last entry
|
||||
{NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user