libabigail/include
Dodji Seketeli c99addc245 Initial support to lookup types per location
This patch adds support to associate a type to its source location.
The location being a string of the form "filepath:line:column".  The
association is done by a per-translation unit map which associates a
location to a type.

For the moment this only associates one type to a given location.  For
the general case, though, we need to associate a vector or types to a
given location.  We'll add that support later.

The patch provides lookup functions, each of which looking up a
particular kind of type by its location.

	* include/abg-fwd.h (get_name_of_qualified_type)
	(get_name_of_reference_to_type, lookup_basic_type_per_location)
	(lookup_class_type_per_location, lookup_union_type_per_location)
	(lookup_enum_type_per_location, lookup_typedef_type)
	(lookup_typedef_type_per_location, lookup_pointer_type)
	(lookup_reference_type, lookup_type_per_location)
	(lookup_type_through_translation_units)
	(lookup_type_from_translation_unit, odr_is_relevant): Declare new
	functions or new function overloads.
	* include/abg-ir.h (location::expand): Declare new member
	function.
	(type_maps::empty): Likewise.
	(operator|=): Declare an overload for qualified_type_def::CV.
	(get_string_representation_of_cv_quals)
	(get_name_of_qualified_type, lookup_qualified_type): Declare new functions.
	* src/abg-ir.cc (location::expand): Define new member function.
	(type_maps::empty): Likewise.
	(odr_is_relevant): Likewise.
	(get_string_representation_of_cv_quals)
	(get_name_of_reference_to_type, get_name_of_qualified_type)
	(lookup_union_type_per_location): Define new functions or overloads.
	(lookup_basic_type, lookup_enum_type, lookup_typedef_type)
	(lookup_qualified_type, lookup_pointer_type)
	(lookup_reference_type, lookup_type_from_translation_unit)
	(lookup_basic_type_per_location, lookup_basic_type_per_location)
	(lookup_class_type_per_location, lookup_class_type_per_location)
	(lookup_enum_type_per_location, lookup_enum_type_per_location)
	(lookup_typedef_type_per_location)
	(lookup_typedef_type_per_location, lookup_type_per_location):
	Define new overloads.
	(maybe_update_types_lookup_map)
	(maybe_update_types_lookup_map<class_decl>)
	(maybe_update_types_lookup_map<function_type>): Add a new
	use_type_name_as_key parameter.  If it's false, then associates
	the type to its location rather than to its name.
	(maybe_update_types_lookup_map): In the overloads for type_decl,
	class_decl, union_decl, enum_type, typedef_decl, array_type_def,
	record the type in the lookup map per location, in addition to the
	per-name recording.
	(qualified_type_def::build_name): Use the new
	get_name_of_qualified_type.
	(qualified_type_def::get_cv_quals_string_prefix): Use the new
	get_string_representation_of_cv_quals.
	(operator|=): Define a new overload for qualified_type_def::CV.
	(pointer_type_def::get_qualified_name): Use the new
	get_name_of_pointer_to_type.
	(reference_type_def::get_qualified_name): Use the new
	get_name_of_reference_to_type.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2017-07-03 17:45:36 +02:00
..
abg-comp-filter.h Fix some clang compile problems 2017-06-02 22:50:06 +02:00
abg-comparison.h Fix some clang compile problems 2017-06-02 22:50:06 +02:00
abg-config.h Add --version option to several libabigail tools 2015-11-16 12:54:10 +01:00
abg-corpus.h Create a Corpus Group API extension 2017-07-03 17:45:36 +02:00
abg-diff-utils.h cppcheck: mitigate performance warnings 2017-04-14 04:41:44 -04:00
abg-dwarf-reader.h Support Linux Kernel binaries 2017-01-06 12:35:22 +01:00
abg-fwd.h Initial support to lookup types per location 2017-07-03 17:45:36 +02:00
abg-hash.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-ini.h Fix more clang build warnings 2017-06-02 23:12:14 +02:00
abg-interned-str.h Cleanup namespace importing in abg-interned-str.h 2016-10-10 12:57:47 +02:00
abg-ir.h Initial support to lookup types per location 2017-07-03 17:45:36 +02:00
abg-libxml-utils.h Bug 20970 - Add a --annotate option to abidw 2017-01-24 15:41:37 +01:00
abg-libzip-utils.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-reader.h Drop suppressed ABI artifacts from the IR 2016-09-21 18:35:08 +02:00
abg-sptr-utils.h Setup per-corpus type maps indexed by type names 2016-11-29 16:16:43 +01:00
abg-suppression.h Support Linux Kernel ABI whitelist files 2017-01-06 12:41:57 +01:00
abg-tools-utils.h Support Linux Kernel ABI whitelist files 2017-01-06 12:41:57 +01: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 cppcheck: mitigate performance warnings 2017-04-14 04:41:44 -04:00
abg-viz-svg.h cppcheck: mitigate performance warnings 2017-04-14 04:41:44 -04:00
abg-workers.h Several fixes and enhancements to abigail::workers 2017-02-27 09:48:08 +01:00
abg-writer.h Bug 20970 - Add a --annotate option to abidw 2017-01-24 15:41:37 +01:00
Makefile.am Split suppression engine off of abg-comparison.{cc,h} 2016-05-08 12:29:57 +02:00