[4/4] Pass bind_function_type_life_time a complete type.
Commit Message
Calling bind_function_type_life_time with an incomplete function type
is remaining cause of incomplete pretty representations of types being
generated and cached and then later used in reports.
This patch moves the call to this function to after the type is
complete. Update test that illustrated incomplete function type.
* src/abg-reader.cc: Move call to bind_function_type_life_time
to end of function.
* tests/data/test-abidiff-exit/test-fun-param-report.txt: Fix
incomplete function type.
Signed-off-by: Giuliano Procida <gprocida@google.com>
---
src/abg-reader.cc | 2 +-
tests/data/test-abidiff-exit/test-fun-param-report.txt | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
@@ -3753,7 +3753,6 @@ build_function_type(read_context& ctxt,
: new function_type(return_type,
parms, size, align));
- ctxt.get_translation_unit()->bind_function_type_life_time(fn_type);
ctxt.key_type_decl(fn_type, id);
for (xmlNodePtr n = node->children; n ; n = n->next)
@@ -3780,6 +3779,7 @@ build_function_type(read_context& ctxt,
}
fn_type->set_parameters(parms);
+ ctxt.get_translation_unit()->bind_function_type_life_time(fn_type);
return fn_type;
}
@@ -8,7 +8,7 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
in pointed to type 'struct ops' at test-fun-param-v1.c:1:1:
type size hasn't changed
1 data member change:
- type of 'void ()* ops::bind_class' changed:
+ type of 'void (void*, unsigned int, unsigned long int)* ops::bind_class' changed:
in pointed to type 'function type void (void*, unsigned int, unsigned long int)':
parameter 4 of type 'void*' was added
parameter 5 of type 'unsigned long int' was added