Use is_empty_type instead of zero-sized type.
authorAndrew Pinski <apinski@marvell.com>
Mon, 31 May 2021 12:25:28 +0000 (12:25 +0000)
committerAndrew Pinski <apinski@marvell.com>
Tue, 1 Jun 2021 18:25:47 +0000 (18:25 +0000)
commit34aae6b561871d6d8b10c810f303cb6f18b5fdd0
treede7a043d78d5540fa219a3e12778edf1344942eb
parent833d348aec154f231525ad2bf4c8a51c8d16b213
Use is_empty_type instead of zero-sized type.

Instead of only removing assignments of zero-sized types,
assignments of all empty types should be removed during gimplification.
This moves to use is_empty_type which will be used in other places too.

OK?  Bootstrapped and tested on aarch64-linux-gnu with no regressions.

Thanks,
Andrew Pinski

gcc/ChangeLog:

* gimplify.c (zero_sized_field_decl): Delete
(zero_sized_type): Delete
(gimplify_init_ctor_eval): Use is_empty_type instead
of zero_sized_field_decl.
(gimplify_modify_expr): Use is_empty_type instead of
zero_sized_type.
gcc/gimplify.c