* include/abg-fwd.h: Wrap IR artifacts into abigail::ir namespace.
Inject that new abigail::ir namespace into the abigail namespace.
* include/abg-ir.h: Wrap IR artifacts into abigail::ir namespace.
(function_decl::parameter::get_type_name): Adjust the call to
abigail::get_type_name. It's now a call to
abigail::ir::get_type_name.
* src/abg-ir.cc: Wrap IR artifacts into abigail::ir namespace.
* include/abg-traverse.h: Wrap the ir traversing artifact into the
abigail::ir namespace too.
* src/abg-traverse.cc: Adjust.
* include/abg-corpus.h: Wrap corpus type stuff into abigail::ir.
* include/abg-dwarf-reader.h: Inject namespace abigail::ir stuff
into the abigail::dwarf_reader namespace.
* include/abg-reader.h: Inject namespace abigail::ir stuff into
the abigail::xml_reader namespace.
* src/abg-reader.cc: Adjust.
* include/abg-writer.h: Inject namespace abigail::ir stuff into
the abigail::xml_writer namespace.
* src/abg-writer.cc: Inject namespace abigail::ir stuff into
abigail namespace here too.
* src/abg-hash.cc: Inject the abigail::ir namespace into the
abigail namespace.
* tools/abg-tools-utils.cc: Adjust for the injection of
abigail::function_decl. It's now abigail::ir::function_decl.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* include/abg-reader.h (read_corpus_from_native_xml)
(read_corpus_from_native_xml_file): Declare new entry points.
* include/abg-writer.h (write_corpus_to_native_xml)
(write_corpus_to_native_xml_file): Likewise.
* src/abg-reader.cc (read_translation_unit_from_input): Renamed
read_input into this. Support new 'path' attribute for
'abi-instr' XML element.
(read_corpus_from_input): New static function.
(read_translation_unit_from_file)
(read_translation_unit_from_buffer)
(read_translation_unit_from_istream): Update wrt read_input ->
read_translation_unit_from_input.
(read_corpus_from_native_xml, read_corpus_from_native_xml)
(read_corpus_from_native_xml_file): Define new entry points.
* src/abg-writer.cc (write_translation_unit): Write 'path'
attribute into the 'abi-instr' xml element.
(write_corpus_to_native_xml, write_corpus_to_native_xml_file):
Define new entry points.
* tools/abg-tools-utils.h (file_type::{FILE_TYPE_XML_CORPUS,
FILE_TYPE_ZIP_CORPUS}): New enumerators.
* tools/abg-tools-utils.cc (guess_file_type): Support detection of
the new xml file format containing a document root 'abi-corpus'
root element.
* tools/bidiff.cc (main): Support diffing xml corpus-es and zip
corpus-es.
* tools/bidw.cc (main): Recognize elf files before reading them.
* tools/bilint.cc (main): Support reading xml/zip corpus-es too.
* tests/data/test-read-write/test[0-23].xml: Update 'path'
attribute.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* include/abg-reader.h: New file with abigail::xml_reader APIs.
* include/abg-writer.h: New file with abigail::xml_writer APIs.
* include/Makefile.am: Add the new files above to the source
distribution.
* src/abg-reader.cc: Update top-file comments.
(namespace xml_reader): Rename namespace
reader into this.
(read_to_translation_unit, read_corpus_from_archive): New static
functions.
(read_translation_unit_from_file)
(read_translation_unit_from_file, read_corpus_from_file): New
entry points.
(struct array_deleter): New functor.
(translation_unit::read): Remove this.
* src/abg-writer.cc: Update top file comments.
(namespace xml_writer): Rename namespace
writer into this.
(struct archive_write_ctxt): New internal type.
(create_archive_write_context, write_translation_unit_to_archive)
(write_translation_unit, write_corpus_to_archive): New low level
static functions overloads.
(write_corpus_to_archive, write_translation_unit): Public higher
level overloads.
(translation_unit::write): Remove.
(dump): Update for new xml_writer namespace.
* include/abg-ir.h (translation_unit::{read, write}): Remove these
serialization methods.
* include/abg-corpus.h (corpus_sptr): New convenience typedef.
(corpus::{read, write}): Remove these methods.
* src/abg-corpus.cc (corpus::{read, write})
(corpus::impl::{serialized_tus, archive}): Remove these members.
(corpus::impl::{get_archive, close_archive, write_tu_to_archive,
read_to_translation_unit}): Remove these methods.
* tests/test-bidiff.cc (main): Update for usage of the new
xml_reader API.
* tests/test-read-write.cc (main): Likewise. Update for the usage
of the new xml_writer API, too.
* tests/test-walker.cc (main): Update for the usage of the new
xml_reader API.
* tests/test-write-read-archive.cc (main): Likewise. And for the
xml_writer API, too.
* tools/biar.cc (add_tus_to_archive, extract_tus_from_archive): Likewise.
* tools/bidiff.cc (main): Likewise, for xml_reader APIs.
* tools/bilint.cc (main): Likewise, for xml_writer APIs, too.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>