]> sourceware.org Git - libabigail.git/commit
Better support for enum diffs
authorDodji Seketeli <dodji@redhat.com>
Tue, 16 Sep 2014 11:40:35 +0000 (13:40 +0200)
committerDodji Seketeli <dodji@redhat.com>
Tue, 16 Sep 2014 12:02:27 +0000 (14:02 +0200)
commitba487a2cd9818c6074329e4c6f6a7148e8620ff5
tree9c4546bc67c29d5029acfa82bfed16dd68a3167c
parent41cfd5a82b29f90470b828afb39e1192106ee978
Better support for enum diffs

* include/abg-comparison.h (changed_enumerator_type): New typedef.
(diff_category::{HARMLESS_ENUM_CHANGE_CATEGORY}): New enumerator.
* src/abg-comp-filter.cc (has_type_size_change)
(has_enumerator_insertion, has_enumerator_removal_or_change)
(has_harmful_enum_change): New functions.
(harmless_filter::visit): Categorize enumerator insertions that
don't change the size of the type into HARMLESS_ENUM_CHANGE_CATEGORY.
(harmful_filter::visit): Categorize enumerator removal or any enum
change that changes the size of the type into
SIZE_OR_OFFSET_CHANGE_CATEGORY.
* src/abg-comparison.cc (enumerator_value_comp)
(changed_enumerator_comp): New types.
(sort_enumerators, sort_changed_enumerators): New static
functions.
(enum_diff::report): Sort enum related reports by the value of the
enumerators.
* src/abg-dwarf-reader.cc (build_enum_type): Name anonymous enums
as __anonymous_enum__.
  * tools/bidiff.cc (set_diff_context_from_opts): Add
abigail::comparison::HARMLESS_ENUM_CHANGE_CATEGORY into the harmless
stuff camp.
* tests/data/test-diff-dwarf/test15-enum-report.txt: New test
input.
* tests/data/test-diff-dwarf/test15-enum-v1.o: Likewise.
* tests/data/test-diff-dwarf/test15-enum-v0.o: Likewise.
* tests/data/test-diff-dwarf/test15-enum-v0.cc: Source code for
test input.
* tests/data/test-diff-dwarf/test15-enum-v1.cc: Likewise.

* tests/data/test-diff-filter/test19-enum-report-0.txt: New test input.
* tests/data/test-diff-filter/test19-enum-report-1.txt: Likewise.
* tests/data/test-diff-filter/test19-enum-v0.o: Likewise.
* tests/data/test-diff-filter/test19-enum-v1.o: Likewise.
* tests/data/test-diff-filter/test19-enum-v0.cc: Source code for
test input.
* tests/data/test-diff-filter/test19-enum-v1.cc: Likewise.
* tests/test-diff-dwarf.cc: Run this test harness on the new test
inputs above.
* tests/test-diff-filter.cc: Likewise.
* tests/Makefile.am: Add the new files above to the source distribution.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
19 files changed:
include/abg-comparison.h
src/abg-comp-filter.cc
src/abg-comparison.cc
src/abg-dwarf-reader.cc
tests/Makefile.am
tests/data/test-diff-dwarf/test15-enum-report.txt [new file with mode: 0644]
tests/data/test-diff-dwarf/test15-enum-v0.cc [new file with mode: 0644]
tests/data/test-diff-dwarf/test15-enum-v0.o [new file with mode: 0644]
tests/data/test-diff-dwarf/test15-enum-v1.cc [new file with mode: 0644]
tests/data/test-diff-dwarf/test15-enum-v1.o [new file with mode: 0644]
tests/data/test-diff-filter/test19-enum-report-0.txt [new file with mode: 0644]
tests/data/test-diff-filter/test19-enum-report-1.txt [new file with mode: 0644]
tests/data/test-diff-filter/test19-enum-v0.cc [new file with mode: 0644]
tests/data/test-diff-filter/test19-enum-v0.o [new file with mode: 0644]
tests/data/test-diff-filter/test19-enum-v1.cc [new file with mode: 0644]
tests/data/test-diff-filter/test19-enum-v1.o [new file with mode: 0644]
tests/test-diff-dwarf.cc
tests/test-diff-filter.cc
tools/bidiff.cc
This page took 0.03887 seconds and 5 git commands to generate.