libabigail/tests
Dodji Seketeli 270fd9d10c Introduce/use translation_unit & global_scope types
* abg-corpus.h (abi_corpus::{get_decls, get_loc_mgr}): Remove.
	(abi_corpus::add): New function to add a translation unit.
	(abi_corpus::get_translation_units): New declaration.
	* abg-corpus.cc (abi_corpus::*): Remove all the definitions of
	abi_corpus for now, as the abi_corpus type is not used anymore --
	for now at least.
	* src/abg-ir.h (add_decl_to_scope, get_global_scope)
	(get_translation_unit, is_global_scope, is_decl_at_global_scope)
	(class translation_unit, class global_scope): New declarations
	* src/abg-ir.cc (translation_unit::translation_unit)
	(translation_unit::get_global_scope)
	(translation_unit::get_loc_mgr, translation_unit::get_loc_mgr)
	(translation_unit::is_empty, get_global_scope)
	(get_translation_unit, is_global_scope, is_global_scope)
	(is_decl_at_global_scope, global_scope::~global_scope): New
	definitions.
	(scope_decl::scope_decl, scope_decl::scope_decl)
	(scope_decl::add_member_decl, scope_decl::get_member_decls): Move
	to abg-ir.h, inline.
	* src/abg-reader.h (read_file): Don't use abi_corpus in the api.
	Rather, use translation_unit.
	* src/abg-reader.cc (read_context::get_cur_scope): Now that we
	have a specific instance of global_scope to represent global
	scope, don't play games with empty scopes to detect a global
	scope.
	(read_context::get_translation_unit): New definition.
	(read_context::finish_decl_creation, finish_type_decl_creation):
	(read_input, read_file, read_location, handle_element)
	(handle_type_decl)
	(handle_namespace_decl, handle_qualified_type_decl)
	(handle_pointer_type_def, handle_reference_type_def)
	(handle_enum_type_decl, handle_typedef_decl, handle_var_decl):
	Don't use abi_corpus anymore.  Rather, the translation unit a decl
	belongs to is accessible from the decl itself.
	* src/abg-writer.h (write_to_ostream): Use translation_unit in
	this API, rather than abi_corpus.
	* src/abg-writer.cc (write_translation_unit): Rename write_corpus
	into this.  And stop using abi_corpus here.
	(write_to_ostream, write_corpus, write_location, write_decl)
	(write_type_decl, write_namespace_decl, write_qualified_type_def)
	(write_pointer_type_def, write_reference_type_def)
	(write_enum_type_decl, write_typedef_decl, write_var_decl): Stop
	using abi_corpus.  Use the translation_unit that is accessible
	from the decl being serialized, if need be.
	* test-read-write.cc (main):  De-serialize the input into an
	instance of translation_unit, not an abi_corpus anymore, and
	serialize that translation_unit.
2013-04-03 15:05:07 +02:00
..
data/test-read-write Support var decl & mangled_name attributes 2013-04-02 16:51:59 +02:00
Makefile.am Support var decl & mangled_name attributes 2013-04-02 16:51:59 +02:00
test-read-write.cc Introduce/use translation_unit & global_scope types 2013-04-03 15:05:07 +02:00
test-utils.cc Debug type-decl serialization 2013-03-22 16:53:26 +01:00
test-utils.h Debug type-decl serialization 2013-03-22 16:53:26 +01:00