diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2024-03-23 14:20:14 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2024-05-20 09:47:03 +0200 |
commit | 727e7d69240d31215e0fcad9e91c1f67942e4500 (patch) | |
tree | 06e2ab1a2b19958e8cbaf9eaf28597f89fed5502 /gcc/ada/fe.h | |
parent | 9edbaab0f6eb83351ef65e5bc0e427a415e04915 (diff) | |
download | gcc-727e7d69240d31215e0fcad9e91c1f67942e4500.zip gcc-727e7d69240d31215e0fcad9e91c1f67942e4500.tar.gz gcc-727e7d69240d31215e0fcad9e91c1f67942e4500.tar.bz2 |
ada: Another small cleanup about allocators and aggregates
This eliminates a few more oddities present in the expander for allocators
and aggregates nested in allocators and other constructs:
- Convert_Aggr_In_Allocator takes both the N_Allocator and the aggregate
as parameters, while the sibling procedures Convert_Aggr_In_Assignment
and Convert_Aggr_In_Object_Decl only take the former. This changes the
first to be consistent with the two others and propagates the change to
Convert_Array_Aggr_In_Allocator.
- Convert_Aggr_In_Object_Decl contains an awkward code structure with a
useless inner block statement.
- In_Place_Assign_OK and Convert_To_Assignments have some declarations of
local variables not in the right place.
No functional changes (presumably).
gcc/ada/
* exp_aggr.ads (Convert_Aggr_In_Allocator): Remove Aggr parameter
and adjust description.
(Convert_Aggr_In_Object_Decl): Adjust description.
* exp_aggr.adb (Convert_Aggr_In_Allocator): Remove Aggr parameter
and add local variable of the same name instead. Adjust call to
Convert_Array_Aggr_In_Allocator.
(Convert_Aggr_In_Object_Decl): Add comment for early return and
remove useless inner block statement.
(Convert_Array_Aggr_In_Allocator): Remove Aggr parameter and add
local variable of the same name instead.
(In_Place_Assign_OK): Move down declarations of local variables.
(Convert_To_Assignments): Put all declarations of local variables
in the same place. Fix typo in comment. Replace T with Full_Typ.
* exp_ch4.adb (Expand_Allocator_Expression): Call Unqualify instead
of Expression on the qualified expression of the allocator for the
sake of consistency. Adjust call to Convert_Aggr_In_Allocator.
Diffstat (limited to 'gcc/ada/fe.h')
0 files changed, 0 insertions, 0 deletions