mirror of
git://sourceware.org/git/libabigail.git
synced 2025-03-11 09:08:04 +00:00
* src/abg-ir.cc (decl_base_hash::operator()): Don't hash the context for decls in general. * src/abg-reader.cc (read_context::push_decl_to_current_scope) (read_context::push_and_key_type_decl): Add an overload that takes a node and update_depth_info boolean. (build_var_decl, build_type_decl, build_qualified_type_decl) (build_pointer_type_def, build_reference_type_def) (build_enum_type_decl, build_type_decl) (build_template_type_parameter, build_template_non_type_parameter) (build_template_template_parameter, build_template_parameter) (build_type): Make these functions take an update_depth_info parameter. Pass it do read_context::push_and_key_type_decl or read_context::push_decl_to_current_scope rather than call update_read_context. (build_function_decl, build_class_decl) (build_function_template_decl): Change the seen_by_reader parameter into update_depth_info. Pass the update_depth_info bool to read_context::push_decl_to_current_scope rather than call update_depth_info here. (handle_class, handle_function_template_decl): Adjust. * tests/data/test-read-write/test12.xml: Add new test input. * tests/test-read-write.cc (InOutSpec in_out_specs): Add it to the list of input to de-serialize, serialize back and compare the two. * tests/Makefile.am: Add the new test input to the distribution.
30 lines
1.1 KiB
XML
30 lines
1.1 KiB
XML
<abi-instr version='1.0'>
|
|
<type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-1'/>
|
|
<namespace-decl name='ns0'>
|
|
<namespace-decl name='ns1'>
|
|
<function-template-decl id='fn-tmpl-id-2'>
|
|
<template-type-parameter id='type-id-3' name='T'/>
|
|
<template-type-parameter id='type-id-4' name='U'/>
|
|
<function-decl name='foo' binding='global'>
|
|
<parameter type-id='type-id-3' name='first'/>
|
|
<parameter type-id='type-id-4' name='second'/>
|
|
<return type-id='type-id-1'/>
|
|
</function-decl>
|
|
</function-template-decl>
|
|
</namespace-decl>
|
|
</namespace-decl>
|
|
<namespace-decl name='ns2'>
|
|
<namespace-decl name='ns3'>
|
|
<namespace-decl name='ns4'>
|
|
<function-template-decl id='fn-tmpl-id-5'>
|
|
<template-type-parameter id='type-id-6' name='T'/>
|
|
<function-decl name='bar' binding='global'>
|
|
<parameter type-id='type-id-6' name='first'/>
|
|
<return type-id='type-id-1'/>
|
|
</function-decl>
|
|
</function-template-decl>
|
|
</namespace-decl>
|
|
</namespace-decl>
|
|
</namespace-decl>
|
|
</abi-instr>
|