Streamline implementation of renaming in gigi
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 23 Jun 2020 16:02:07 +0000 (18:02 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 23 Jun 2020 16:35:46 +0000 (18:35 +0200)
commit5bdd063b9d8082cb8c8ede2721f1f425d3b952f0
treeac5e1dccfac67272224c2b532db82f4c076a4162
parentcd42cdc225a905cb1eb38dfad453e654261a659e
Streamline implementation of renaming in gigi

The main changes are 1) the bulk of the implementation is put back entirely
in gnat_to_gnu_entity and 2) the handling of lvalues is unified, i.e. it no
longer depends on the Materialize_Entity flag being present on the entity.

gcc/ada/ChangeLog:
* gcc-interface/ada-tree.h (DECL_RENAMED_OBJECT): Delete.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always use
the stabilized reference directly for renaming and create a variable
pointing to it separately if requested.
* gcc-interface/misc.c (gnat_print_decl): Adjust for deletion.
* gcc-interface/trans.c (Identifier_to_gnu): Likewise.
(gnat_to_gnu) <N_Object_Renaming_Declaration>:
Do not deal with side-effects here.
<N_Exception_Renaming_Declaration>: Likewise.
gcc/ada/gcc-interface/ada-tree.h
gcc/ada/gcc-interface/decl.c
gcc/ada/gcc-interface/misc.c
gcc/ada/gcc-interface/trans.c