mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-16 15:04:46 +00:00
ee19845a94
* src/abg-ir.h (scope_decl::scope_decl) (scope_type_decl::scope_type_decl): Don't set mangled name for scope_decl instances as it doesn't make sense. (var_decl::var_decl): Pass the type shared pointer by value. (struct var_decl_hash, function_decl::parameter::operator==) (struct function_decl::parameter_hash, function_decl::operator==) (struct function_decl_hash, class class_decl, struct class_decl_hash): New declarations. * src/abg-ir.cc (scope_type_decl::scope_type_decl): Don't set the mangled name. It doesn't make sense for scope_decls. (dynamic_type_hash::operator): Fix comment. Run the hashing for scope_type_decl instances *after* running it for class_decl instance, otherwise, the class_decl instances case will never get hit. (var_decl::var_decl): Pass the type shared pointer by value. (function_decl::operator==, class_decl::operator==) (class_decl_hash::operator()): New fns. * src/abg-libxml-utils.h (get_xml_node_depth): Declare new fn. (XML_READER_GET_ATTRIBUTE): Fix comment. (XML_NODE_GET_ATTRIBUTE): New getter macro. * src/abg-libxml-utils.cc (get_xml_node_depth): New definition. * src/abg-reader.cc (update_read_context) (update_depth_info_of_read_context, read_visibility, read_binding) (read_access, read_size_and_alignment, read_static) (read_var_offset_in_bits, read_cdtor_const, build_function_decl) ( build_var_decl, build_type_decl, build_qualified_type_decl) (build_pointer_type_def, build_reference_type_def) (build_enum_type_decl, build_typedef_decl, build_class_decl) (build_type, handle_class_decl): New functions or overloads. (handle_element): Update to handle "class-decl" xml elements. * src/abg-writer.cc (write_size_and_alignment, write_access) (write_class, do_indent_to_level, get_indent_to_level): New fns. (write_decl): Update to serialize instances of class_decl. (write_type_decl, write_pointer_type_def) (write_reference_type_def): Use the new write_size_and_alignment instead of writing the attributes directly. * tests/data/test-read-write/test10.xml: New test file. * tests/Makefile.am: Add tests/data/test-read-write/test10.xml to the build system. * tests/test-read-write.cc (in_out_spec): De-serialize data/test-read-write/test10.xml, serialize it back into output/test-read-write/test10.xml, and compare the two output that should be identical. |
||
---|---|---|
.. | ||
data/test-read-write | ||
Makefile.am | ||
test-read-write.cc | ||
test-utils.cc | ||
test-utils.h |