libabigail/include
Dodji Seketeli 93fea0667e Better recognize qualified void type
This fixes Bug 20329 - DW_TAG_const_type with no DW_AT_type not recognized as "const void".

It appears that GCC sometimes emits "const void" types by emitting a
const type DIE with no type attribute.  The DWARF reader didn't
recognize that construct as a qualified void type.

This patch teaches the DWARF reader to recognize that construct.

It also appears that "const void" and "void" are equivalent and can be
emitted interchangeably by compilers (Intel and GCC) in their debug
info.  That can lead to spurious ABI change reports saying that a type
"const void" was changed into a "void" type.

This patch transforms an occurrence of "const void" type into a "void"
type in the internal representation when reading DWARF.  This does
away with the spurious change that appears when comparing selected
binaries emitted with the intel against binaries emitted with GCC.

	* include/abg-ir.h (environment::is_void_type): Declare new member
	function.
	* src/abg-ir.cc (environment::is_void_type): Define new member
	function.
	* src/abg-dwarf-reader.cc (maybe_strip_qualification): Strip const
	qualifier from const void.
	* tests/data/test-diff-filter/test34-libjemalloc.so.2-gcc-6.1.0:
	New test input.
	* tests/data/test-diff-filter/test34-libjemalloc.so.2-intel-16.0.3: Likewise.
	* tests/data/test-diff-filter/test34-report-0.txt: New reference output.
	* tests/data/Makefile.am: Add the new files above to the source
	distribution.
	* tests/test-diff-filter.cc (in_out_specs): Compare the two new
	binaries above.
	* tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Adjust.
	* tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Adjust.
	* tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt: Adjust.
	* tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt: Adjust.
	* tests/data/test-read-dwarf/test1.abi: Adjust.
	* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
	* tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
	* tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
	* tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust.
	* tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
	* tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
	* tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
	* tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
	* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Adjust.
	* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Adjust.
	* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Adjust.
	* tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
	* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust.
	* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-07-07 14:04:10 +02:00
..
abg-comp-filter.h Make abi{pkg}diff filter out changes about private types 2016-05-24 10:32:08 +02:00
abg-comparison.h Plug leak of diffs of member variables of class type 2016-05-22 23:20:13 +02:00
abg-config.h Add --version option to several libabigail tools 2015-11-16 12:54:10 +01:00
abg-corpus.h Implement string interning for Libabigail 2016-02-24 15:13:20 +01:00
abg-diff-utils.h Constify some diff-utils functor operators 2015-09-21 10:46:06 +02:00
abg-dwarf-reader.h Add some apidoc to dwarf_reader 2016-05-06 18:18:07 +02:00
abg-fwd.h Add a new overload for is_type_decl 2016-07-04 16:51:10 +02:00
abg-hash.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-ini.h Support source_location_not_in and source_location_not_regexp suppressions 2015-09-16 20:54:40 +02:00
abg-interned-str.h Implement string interning for Libabigail 2016-02-24 15:13:20 +01:00
abg-ir.h Better recognize qualified void type 2016-07-07 14:04:10 +02:00
abg-libxml-utils.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-libzip-utils.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-reader.h Introduce the concept of environment 2015-09-07 23:35:29 +02:00
abg-sptr-utils.h Plug leak of regex_t in suppression engine 2016-05-22 23:20:13 +02:00
abg-suppression.h Make abi{pkg}diff filter out changes about private types 2016-05-24 10:32:08 +02:00
abg-tools-utils.h Bug 20180 - Support system-wide suppression specifications 2016-05-30 18:39:49 +02:00
abg-traverse.h Canonicalize types either early or late after TU reading 2015-02-18 21:32:37 +01:00
abg-version.h.in Add --version option to several libabigail tools 2015-11-16 12:54:10 +01:00
abg-viz-common.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-viz-dot.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-viz-svg.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-workers.h Make API documentation of thread pools visible 2016-04-27 23:58:50 +02:00
abg-writer.h Update copyright years 2015-01-07 17:52:10 +01:00
Makefile.am Split suppression engine off of abg-comparison.{cc,h} 2016-05-08 12:29:57 +02:00