Commit Graph

103 Commits

Author SHA1 Message Date
Dodji Seketeli
95ec67b143 Implement a translation unit traversal API
* include/libabigail/abg-ir.h (struct ir_node_visitor, struct
	traversable): New interfaces.
	(translation_unit, scope_decl, type_decl, qualified_type_def)
	(pointer_type_def, reference_type_def, enum_type_decl)
	(typedef_decl, var_decl, function_decl, data_member)
	(member_function, member_function_template)
	(member_class_template): Implement the traversable interface,
	overload the traversable::traverse pure virtual function.
	* src/abg-ir.cc ({translation_unit, scope_decl, type_decl,
	namespace_decl, qualified_type_def, pointer_type_def,
	reference_type_def, enum_type_decl, typedef_decl, var_decl,
	function_decl, class_decl::member_function, class_decl,
	class_decl::data_member, class_decl::member_function_template,
	class_decl::member_class_template, function_template_decl,
	class_template_decl, }::traverse): Implement traversal.
	(ir_node_visitor::visit): New method, overloaded for the types
	above, which implement the traversable interface.
	* tests/test-walker.cc: New test case program to showcase how to
	use the new traversal API.
	* tests/makefile.am: Add test-walker.cc to the build system.
2013-07-23 23:13:56 +02:00
Dodji Seketeli
04873cb485 Move static member definition to abg-viz-dot.cc file
* include/libabigail/abg-viz-dot.h: Move definition of
	node_base::_M_count_total to ...
	* src/abg-viz-dot.cc: ... here.
2013-07-23 23:13:56 +02:00
Dodji Seketeli
f9d66af03c Put headers in include/libabigail
* include/libabigail: New directory.
	* include/Makefile.am:  New file.
	* include/libabigail/Makefile.am: New file.
	* src/abg-*.h: Move these in include/libabigail/*.h
	* src/Makefile.am: Set -I option to look for headers in include/libabigail
	* doc/api/libabigail.doxy: Look for headers in include/libabigail
	* tests/Makefile.am: Set -I option to look for headers in include/libabigail
	* abigail.m4: Set includedir to $prefix/include/libabigail for
	library used as a dep, or to srcdir/libabigail/include/libabigail
	in GCC source tree.
	* configure.ac: Add Makefile.am in include and include/libabigail
	* abigail.m4: Look for headers in include/libabigail when the
	libabigail is in in the source tree and in $incdir/libabigail when
	it is installed as a dependency.
2013-07-23 23:13:56 +02:00