libabigail/tools
Mark Wielaard a9f5fb4089 Add --no-write-default-sizes option.
abidw will write out the exact same size-in-bits address for every
pointer type, reference type, function declaration and function type
even though it is always the same as the translation unit address
size. When giving the --no-write-default-sizes option these aren't
written out anymore. The reader is updated to set the default size
when none is given in the XML description.

Even though size and alignment are handled together in the reader,
default alignment is still set to zero, following commit a05384675

Note that this isn't backward compatible with older libabigail
readers, which will set the size to zero when none is given. So this
option isn't the default.

	* doc/manuals/abidw.rst: Document --no-write-default-sizes.
	* include/abg-writer.h (set_write_default_sizes): New function
	declaration.
	(set_common_options): Call set_write_default_sizes.
	* src/abg-reader.cc (build_function_decl): Get default size.
	(build_pointer_type_def): Likewise.
	(build_reference_type_def): Likewise.
	(build_function_type): Likewise.
	* src/abg-writer.cc (write_context): Add m_write_default_sizes
	bool.
	(get_write_default_sizes): New method.
	(set_write_default_sizes): Likewise.
	(write_size_and_alignment): Add default size and alignment
	parameters.
	(set_write_default_sizes): New function.
	(write_type_decl): Set default size and alignment.
	(write_pointer_type_def): Likewise.
	(write_reference_type_def): Likewise.
	(write_function_decl): Likewise.
	(write_function_type): Likewise.
	(write_class_decl_opening_tag): Likewise.
	(write_union_decl_opening_tag): Likewise.
	* tests/test-types-stability.cc (perform): Also test --abidiff
	with --no-write-default-sizes.
	* tools/abidw.cc (option): Add default_sizes bool.
	(parse_command_line): Parse --no-write-default-sizes.
	(display_usage): Add doc string for --no-write-default-sizes.

Signed-off-by: Mark Wielaard <mark@klomp.org>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2020-04-29 11:56:40 +02:00
..
.gitignore Update .gitignore files to ignore typical dev side products 2019-04-16 16:32:52 +02:00
abiar.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
abicompat.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
abidiff.cc Add --header-file option to add individual public header files. 2020-04-14 17:17:28 +02:00
abidw.cc Add --no-write-default-sizes option. 2020-04-29 11:56:40 +02:00
abilint.cc Add --header-file option to add individual public header files. 2020-04-14 17:17:28 +02:00
abipkgdiff.cc abipkgdiff: Fix race condition while using private types suppr specs 2020-04-24 14:51:54 +02:00
abisym.cc abisym: Remove leading space in output. 2020-03-10 18:03:03 +01:00
binilint.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
fedabipkgdiff Bug 22722 - Make fedabipkgdiff and its tests support both python 3 and 2 2018-03-29 13:46:50 +02:00
kmidiff.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
Makefile.am Support loading and comparing two kernel trees 2017-07-03 17:45:36 +02:00