emit: Unwind the definitions for typedefs in type__emit_definitions()
For instance, with the existing code we ended up with: typedef __kernel_size_t size_t; size_t tcp_opt_stats_get_size(void) { } Which lacks unwinding what a __kernel_size_t is, i.e. type__emit_definitions() was only emitting definitions for the members of structs and unions, do it for typedefs too, and then we end up what we need, which is: typedef long unsigned int __kernel_ulong_t; typedef __kernel_ulong_t __kernel_size_t; typedef __kernel_size_t size_t; size_t tcp_opt_stats_get_size(void) { } Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
093135b0bf
commit
e7ebc05d12
@ -294,6 +294,9 @@ int type__emit_definitions(struct tag *tag, struct cu *cu,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (tag__is_typedef(tag))
|
||||
return typedef__emit_definitions(tag, cu, emissions, fp);
|
||||
|
||||
type_emissions__add_definition(emissions, ctype);
|
||||
|
||||
type__for_each_member(ctype, pos)
|
||||
|
Loading…
Reference in New Issue
Block a user