]> sourceware.org Git - libabigail.git/commit
corpus/writer: sort emitted translation units by path name
authorMatthias Maennich <maennich@google.com>
Sun, 12 Jan 2020 21:05:33 +0000 (21:05 +0000)
committerDodji Seketeli <dodji@redhat.com>
Tue, 5 May 2020 11:09:34 +0000 (13:09 +0200)
commit246ca2004930b52b2d7e73f2ba9faa7bcbcd3999
tree132c891c50ae6a451d26008c2643a8426d9f89bc
parent0b9560c19b6a1b97af67f99634897cdb17a79cc6
corpus/writer: sort emitted translation units by path name

By sorting the corpora output, we achieve determinism for the emitted
XML file across multiple runs of abidw.

For that to happen, change the collection of translation units to a
std::set (instead of std::vector), sorted by absolute path name.

Test data needed adjustments, but changes are fully compatible.

* include/abg-fwd.h: remove translation_units fwd declaration.
* include/abg-ir.h (struct shared_translation_unit_comparator):
Define new class.
(translation_units): Define new typedef.
* src/abg-corpus.cc (corpus::add): do checked insert into the
translation_units set (rather than vector::push_back)
* tests/data/test-annotate/test13-pr18894.so.abi: Adjust test data.
* tests/data/test-annotate/test14-pr18893.so.abi: Likewise.
* tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
* tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
* tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
* tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
* tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
* tests/data/test-annotate/test21-pr19092.so.abi: Likewise.

Signed-off-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
include/abg-fwd.h
include/abg-ir.h
src/abg-corpus.cc
tests/data/test-annotate/test13-pr18894.so.abi
tests/data/test-annotate/test14-pr18893.so.abi
tests/data/test-annotate/test15-pr18892.so.abi
tests/data/test-annotate/test17-pr19027.so.abi
tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi
tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi
tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi
tests/data/test-annotate/test21-pr19092.so.abi
This page took 0.034054 seconds and 5 git commands to generate.