diff options
author | Bob Duff <duff@adacore.com> | 2021-06-27 11:03:20 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-09-20 12:31:35 +0000 |
commit | 8e5a8832632eecf5786dff295d073938aeb6d6d8 (patch) | |
tree | 151ee136e01c3cd355f2094f034674a75fabf25b /gcc/ada/layout.adb | |
parent | e97dd2ae763d8c1e78c3b82fc2add4c078fb2357 (diff) | |
download | gcc-8e5a8832632eecf5786dff295d073938aeb6d6d8.zip gcc-8e5a8832632eecf5786dff295d073938aeb6d6d8.tar.gz gcc-8e5a8832632eecf5786dff295d073938aeb6d6d8.tar.bz2 |
[Ada] Clean up Uint fields, remove unused routines
gcc/ada/
* einfo-utils.ads, einfo-utils.adb, fe.h, einfo.ads,
gen_il-fields.ads: Remove unused and no-longer-used routines.
Move related routines together. Rewrite incorrect
documentation, and documentation that will be incorrect when
e.g. Esize-related routines are fixed. Remove unused field
Normalized_Position_Max.
* cstand.adb, exp_pakd.adb, freeze.adb,
gen_il-gen-gen_entities.adb, itypes.adb, layout.adb,
sem_ch10.adb, sem_ch12.adb, sem_ch13.adb, sem_ch3.adb,
sem_ch7.adb, sem_ch8.adb, sem_ch9.adb, sem_prag.adb,
sem_util.adb, ttypes.ads: Update calls to routines removed from
or renamed in Einfo.Utils.
* uintp.ads (Upos): Fix this subtype, which was unintentionally
declared to include Uint_0.
Diffstat (limited to 'gcc/ada/layout.adb')
-rw-r--r-- | gcc/ada/layout.adb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gcc/ada/layout.adb b/gcc/ada/layout.adb index e69386c..700ae79 100644 --- a/gcc/ada/layout.adb +++ b/gcc/ada/layout.adb @@ -155,7 +155,7 @@ package body Layout is exit when Esize (E) mod Abits = 0; end loop; - Init_Alignment (E, Abits / SSU); + Set_Alignment (E, UI_From_Int (Abits / SSU)); return; end if; @@ -243,8 +243,8 @@ package body Layout is -- like or need the size to be set. if Ekind (E) = E_String_Literal_Subtype then - Set_Esize (E, Uint_0); - Set_RM_Size (E, Uint_0); + Reinit_Esize (E); + Reinit_RM_Size (E); return; end if; @@ -379,7 +379,7 @@ package body Layout is -- If size is big enough, set it and exit if S >= RM_Size (E) then - Init_Esize (E, S); + Set_Esize (E, UI_From_Int (S)); exit; -- If the RM_Size is greater than System_Max_Integer_Size @@ -624,13 +624,13 @@ package body Layout is if Is_Scalar_Type (E) then if Size <= SSU then - Init_Esize (E, SSU); + Set_Esize (E, UI_From_Int (SSU)); elsif Size <= 16 then - Init_Esize (E, 16); + Set_Esize (E, Uint_16); elsif Size <= 32 then - Init_Esize (E, 32); + Set_Esize (E, Uint_32); else - Set_Esize (E, (Size + 63) / 64 * 64); + Set_Esize (E, (Size + 63) / 64 * 64); end if; -- Finally, make sure that alignment is consistent with @@ -899,7 +899,7 @@ package body Layout is -- nothing to do with code. if Is_Generic_Type (Root_Type (FST)) then - Set_RM_Size (Def_Id, Uint_0); + Reinit_RM_Size (Def_Id); -- If the subtype statically matches the first subtype, then it is -- required to have exactly the same layout. This is required by @@ -1021,7 +1021,7 @@ package body Layout is -- this new calculated value. if not Known_Alignment (E) then - Init_Alignment (E, A); + Set_Alignment (E, UI_From_Int (A)); -- Cases where we have inherited an alignment @@ -1030,7 +1030,7 @@ package body Layout is -- sure that no constructed types have weird alignments. elsif not Comes_From_Source (E) then - Init_Alignment (E, A); + Set_Alignment (E, UI_From_Int (A)); -- If this inherited alignment is the same as the one we computed, -- then obviously everything is fine, and we do not need to reset it. @@ -1136,7 +1136,7 @@ package body Layout is -- ACATS problem which seems to have disappeared anyway, and -- in any case, this peculiarity was never documented. - Init_Alignment (E, A); + Set_Alignment (E, UI_From_Int (A)); -- If no Size (or Object_Size) was specified, then we have -- inherited the object size, so we should also inherit the |