* 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>
* src/abg-ir.cc (class_template_decl::class_template_decl)
(class_template_decl::set_pattern)
(class_template_decl::operator==)
(class_template_decl::~class_template_decl)
(class_template_decl_hash::operator())
(class_tmpl_shared_ptr_hash::operator()): New definitions.
* src/abg-ir.h (class class_template_decl, struct
class_tmpl_shared_ptr_hash, struct class_tmpl_shared_ptr_hash):
New declarations.
* src/abg-reader.cc (read_context::const_class_tmpl_map_it): New
typedef.
(read_context::get_fn_tmpl_decl): Fix comment.
(read_context::{get_class_tmpl_decl,key_class_tmpl_decl})
(build_class_template_decl, handle_class_template_decl): New
definitions.
(read_context::m_class_tmpl_map): New member.
(handle_element): Support "class-template-decl" xml elements
nodes.
(build_class_decl): Add missing bits to comment.
(build_function_template_decl): Fix spacing.
* src/abg-writer.cc (class_tmpl_shared_ptr_map): New typedef.
(write_context::m_class_tmpl_map): New member.
(write_context::get_id_for_class_tmpl, write_class_template_decl):
New definitions.
(write_template_parameters): Factorize this this out from ...
(write_function_template_decl): ... here.
(write_decl): Support writing instances of class_template_decl.
Fix spacing.
* tests/data/test-read-write/test15.xml: New test input.
* tests/Makefile.am: Add the new test15.xml input to the
distribution.
* tests/test-read-write.cc (in_out_specs): Add the new test15.xml
test to the list of serialized output to be de-serialized and
serialized back.