libabigail/include
Dodji Seketeli 5f9a3bf4dd Fix memory leaks due to cycles in types ownership
* include/abg-fwd.h (std::tr1::weak_ptr): Inject this type in the
	abigail namespace.
	* include/abg-ir.h: Write a memory management guideline for the IR
	artifacts.
	(Type_base_wptr, function_type_wptr)
	(class_decl_wptr): New typedefs.
	(translation_unit::get_canonical_function_type): Declare new
	member function.
	(qualified_type_def::underlying_type_)
	(reference_type_def::pointed_to_type_)
	(typedef_decl::underlying_type_, function_decl::parameter::type_)
	(function_type::return_type_, method_type::class_type_)
	(non_type_tparameter::type_, type_composition::type_): Make this a
	weak pointer.
	(qualified_type_def::get_pointed_to_type)
	(reference_type_def::get_pointed_to_type)
	(array_type::get_element_type, typedef_decl::get_underlying_type)
	(var_decl::get_type, function_decl::parameter::get_type)
	(function_type::get_return_type, method_type::get_class_type)
	(non_type_tparameter::get_type)
	(type_composition::get_composed_type): Adjust to make this return
	a shared pointer initialized with the content of the weak pointer.
	(function_decl::function_decl, method_decl::method_decl): Remove
	the overload that doesn't take a type.  This is because now,
	function types need to be registered to their containing
	translation unit.
	(struct function_type::hash): Declare here.
	* src/abg-hash.cc (struct function_type::hash): Declare this in
	abg-ir.h and just define the methods here.
	* src/abg-ir.cc (fn_type_ptr_map): New typedef.
	(translation_unit::priv::canonical_types_): Remove this unused
	member.
	(translation_unit::priv::canonical_function_types_): New member.
	(translation_unit::get_canonical_function_type): Define this
	function.
	(array_type_def::priv::element_type_, var_decl::priv::type_)
	(function_decl::priv::type_): Make this a weak pointer.
	(qualified_type_def::get_underlying_type)
	(pointer_type_def::get_pointed_to_type)
	(reference_type_def::get_pointed_to_type)
	(array_type_def::get_element_type)
	(typedef_decl::get_underlying_type, var_decl::get_type)
	(function_decl::get_type): Adjust to make this return a shared
	pointer initialized with the content of the weak pointer.
	(qualified_type_def::build_name)
	(pointer_type_def::get_qualified_name)
	(reference_type_def::get_qualified_name): Adjust.
	(method_type::set_class_type): Cleanup the logic.
	(function_decl::priv::priv): Remove the overload that takes a bare
	pointer to a type.  This should not be used now that we need the
	function type to registered with the translation unit.
	(function_decl::function_decl): Remove the overload that doesn't
	take a type.  This is because now, function types need to be
	registered to their containing translation unit.
	* src/abg-dwarf-reader.cc (build_function_decl): Register the
	function type within its translation type and use its canonical
	version.  This complies with the new memory management rules.
	* src/abg-reader.cc (build_function_decl): Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-09-10 18:08:41 +02:00
..
abg-comp-filter.h A builtin type name change is not harmless - fix that 2014-08-22 17:19:27 +02:00
abg-comparison.h Sort reported changed data members by increasing offset 2014-09-03 09:59:03 +02:00
abg-config.h Doxygen markup fixes final. 2013-08-14 15:07:18 +02:00
abg-corpus.h Take symbol versions in account when computing added/removed decls 2014-08-25 23:16:50 +02:00
abg-diff-utils.h Add missing headers double inclusion guards 2014-03-27 13:01:18 +01:00
abg-dwarf-reader.h Support alternate debug info sections 2014-08-15 18:27:04 +02:00
abg-fwd.h Fix memory leaks due to cycles in types ownership 2014-09-10 18:08:41 +02:00
abg-hash.h Misc style fixes 2014-02-10 15:51:10 +01:00
abg-ir.h Fix memory leaks due to cycles in types ownership 2014-09-10 18:08:41 +02:00
abg-libxml-utils.h Serialize and de-serialize elf symbols for var & function decls 2014-05-14 11:19:34 +02:00
abg-libzip-utils.h Initial writing/reading of an ABI corpus to an archive 2013-08-27 16:20:41 +02:00
abg-reader.h Add a symbol database to the ABI Corpus & support symbol aliases 2014-05-28 16:33:35 +02:00
abg-sptr-utils.h Add --drop/--keep options to bidiff 2014-02-28 17:59:39 +01:00
abg-traverse.h Make tree walking preemptive 2014-03-27 13:01:17 +01:00
abg-version.h.in Collapse subdir of include to include. 2013-08-14 15:07:18 +02:00
abg-viz-common.h Forward decls for abg-ir.h, doxygen fixups, restyle. 2013-08-14 15:07:18 +02:00
abg-viz-dot.h Forward decls for abg-ir.h, doxygen fixups, restyle. 2013-08-14 15:07:18 +02:00
abg-viz-svg.h Forward decls for abg-ir.h, doxygen fixups, restyle. 2013-08-14 15:07:18 +02:00
abg-writer.h Misc Doxygen API doc fixes 2014-01-17 15:44:25 +01:00
Makefile.am Initial implementation of diff tree node filtering 2014-03-27 13:01:18 +01:00