ada: Small housekeeping work in expansion of extension aggregates
commitd18dd43c1fdfdd9efe5ade19368f3776a4fd8e3e
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 21 Apr 2023 16:37:12 +0000 (21 18:37 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 13 Jun 2023 07:31:44 +0000 (13 09:31 +0200)
tree618066b885be6563ec0af4503a46d5295c15efb0
parentae3fd5e8a75bf7cf18a98b0d0545ade976c1ec05
ada: Small housekeeping work in expansion of extension aggregates

This avoids repeatedly calling Unqualify on the same node, removes a dead
call to Generate_Finalization_Actions, a redundant setting of Assignment_OK
and reuses a local variable more consistently.  No functional changes.

gcc/ada/

* exp_aggr.adb (Build_Record_Aggr_Code): Add new variable Ancestor_Q
to store the result of Unqualify on Ancestor.  Remove the dead call
to Generate_Finalization_Actions in the case of another aggregate as
ancestor part.  Remove the redundant setting of Assignment_OK.  Use
Init_Typ in lieu of Etype (Ancestor) more consistently.
gcc/ada/exp_aggr.adb