The Git repository of the Libabigail Project
Go to file
Dodji Seketeli 2cc1ab7ee8 writer: Sort decls and fix topological sorting for types
When emitting the declarations of a given translation unit, those
declarations are not sorted.  Ooops.  This patch adds topological
sorting for those declarations, making the decls defined first to be
emitted first.  When the decls are defined at the same location then
the pretty representation is used for lexicographic sorting instead.

It turns out that during the topological sorting for types there was
some uncertainty when the declarations of the types had the same
definition location.  This patch re-uses the declaration sorting above
for the declarations of these types.

	* include/abg-ir.h (scope_decl::get_sorted_member_decls): Declare
	new member function.
	* src/abg-ir.cc (struct decl_topo_comp): New sorting functor.
	(type_topo_comp::operator()): Re-use the decl_topo_comp to sort
	type declarations.
	(scope_decl::priv::sorted_members_): Add new data member.
	(scope_decl::get_sorted_member_decls): Define new member function.
	* src/abg-writer.cc (write_translation_unit): Use the new
	scope_decl::get_sorted_member_decls.
	* tests/data/test-annotate/libtest23.so.abi: Adjust.
	* 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.
	* tests/data/test-read-dwarf/libtest23.so.abi: Likewise.
	* tests/data/test-read-dwarf/test-libandroid.so.abi: Likewise.
	* tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
	* tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
	* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
	Likewise.
	* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
	Likewise.
	* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
	Likewise.
	* tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
	* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
	Likewise.
	* tests/data/test-read-write/test2.xml: Likewise.
	* tests/data/test-read-write/test28-without-std-fns-ref.xml:
	Likewise.
	* tests/data/test-read-write/test28-without-std-vars-ref.xml:
	Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2020-11-12 16:37:30 +01:00
autoconf-archive Do not ignore valgrind checks returning an error 2017-02-27 10:01:15 +01:00
bash-completion Add --self-compare option in fedabipkgdiff 2017-05-31 16:21:14 +05:30
doc Make abidiff and abidw support several --headers-dir{1,2} options 2020-09-18 10:27:18 +02:00
include writer: Sort decls and fix topological sorting for types 2020-11-12 16:37:30 +01:00
m4
scripts Clean up scripts/* 2017-04-14 04:14:12 -04:00
src writer: Sort decls and fix topological sorting for types 2020-11-12 16:37:30 +01:00
tests writer: Sort decls and fix topological sorting for types 2020-11-12 16:37:30 +01:00
tools Make abidiff and abidw support several --headers-dir{1,2} options 2020-09-18 10:27:18 +02:00
.clang-format clang-format: set continuation indentation to 2 2020-05-18 10:48:09 +02:00
.gitignore .gitignore: Add libabigail-?.* *.orig files 2019-05-22 14:34:23 +02:00
abigail.m4 abigail.m4: Fix copyright notice 2020-05-29 18:11:10 +02:00
AUTHORS
ChangeLog Update ChangeLog 2020-02-26 12:08:52 +01:00
COMMIT-LOG-GUIDELINES
COMPILING Fix typo in COMPILING. 2020-02-03 13:49:54 +01:00
configure.ac configure: Support ABIGAIL_NO_OPTIMIZATION_DEBUG environment variable 2020-10-14 13:10:08 +02:00
CONTRIBUTING
COPYING
COPYING-GPLV3
COPYING-LGPLV2
COPYING-LGPLV3
default.abignore Add default suppression specification for the libvirt project 2018-10-11 10:59:54 +02:00
gen-changelog.py gen-changelog.py: Update the script for python3 2020-02-26 12:06:17 +01:00
install-sh
libabigail.pc.in
ltmain.sh
Makefile.am make: add distcheck-fast target 2020-04-20 14:38:32 +02:00
NEWS Update NEWS file for 1.7 2020-02-26 12:07:29 +01:00
README
release-text-template.txt Update the release text template after 1.0 2017-11-22 15:55:43 +01:00
update-copyright.sh Update copyright year to 2020 2020-02-21 17:05:01 +01:00
VISIBILITY

This is the Application Binary Interface Generic Analysis and
Instrumentation Library.

It aims at constructing, manipulating, serializing and de-serializing
ABI-relevant artifacts.

The set of artifacts that we are intersted is made of quantities like
types, variable, fonctions and declarations of a given library or
program.  For a given library or program this set of quantities is
called an ABI corpus.

This library aims at (among other things) providing a way to compare
two ABI Corpora (apparently the plural of corpus is copora, heh,
that's cool), provide detailed information about their differences,
and help build tools to infer interesting conclusions about these
differences.

You are welcome to contribute to this project after reading the files
CONTRIBUTING and COMMIT-LOG-GUIDELINES files in the source tree.

Communicating with the maintainers of this project -- including
sending patches to be include to the source code -- happens via email
at libabigail@sourceware.org.