From 2175b50b74dd03df45b4efb792029848c4a76381 Mon Sep 17 00:00:00 2001 From: Bob Duff Date: Mon, 28 Jun 2021 20:02:20 -0400 Subject: [Ada] Present and No functions for type Uint gcc/ada/ * uintp.ads, uintp.adb (Present, No): New functions for comparing with No_Uint. * checks.adb, einfo-utils.adb, exp_aggr.adb, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_dbug.adb, exp_disp.adb, exp_util.adb, repinfo.adb, repinfo-input.adb, scn.adb, sem_attr.adb, sem_ch13.adb, sem_eval.adb, sem_util.adb, sinfo-utils.adb, treepr.adb: Use Present (...) instead of "... /= No_Uint", and No (...) instead of "... = No_Uint". --- gcc/ada/einfo-utils.adb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'gcc/ada/einfo-utils.adb') diff --git a/gcc/ada/einfo-utils.adb b/gcc/ada/einfo-utils.adb index 5782bd6..d805889 100644 --- a/gcc/ada/einfo-utils.adb +++ b/gcc/ada/einfo-utils.adb @@ -384,19 +384,19 @@ package body Einfo.Utils is function Known_Component_Bit_Offset (E : Entity_Id) return B is begin - return Component_Bit_Offset (E) /= No_Uint; + return Present (Component_Bit_Offset (E)); end Known_Component_Bit_Offset; function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is begin - return Component_Bit_Offset (E) /= No_Uint + return Present (Component_Bit_Offset (E)) and then Component_Bit_Offset (E) >= Uint_0; end Known_Static_Component_Bit_Offset; function Known_Component_Size (E : Entity_Id) return B is begin return Component_Size (E) /= Uint_0 - and then Component_Size (E) /= No_Uint; + and then Present (Component_Size (E)); end Known_Component_Size; function Known_Static_Component_Size (E : Entity_Id) return B is @@ -407,7 +407,7 @@ package body Einfo.Utils is function Known_Esize (E : Entity_Id) return B is begin return Esize (E) /= Uint_0 - and then Esize (E) /= No_Uint; + and then Present (Esize (E)); end Known_Esize; function Known_Static_Esize (E : Entity_Id) return B is @@ -428,29 +428,29 @@ package body Einfo.Utils is function Known_Normalized_First_Bit (E : Entity_Id) return B is begin - return Normalized_First_Bit (E) /= No_Uint; + return Present (Normalized_First_Bit (E)); end Known_Normalized_First_Bit; function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is begin - return Normalized_First_Bit (E) /= No_Uint + return Present (Normalized_First_Bit (E)) and then Normalized_First_Bit (E) >= Uint_0; end Known_Static_Normalized_First_Bit; function Known_Normalized_Position (E : Entity_Id) return B is begin - return Normalized_Position (E) /= No_Uint; + return Present (Normalized_Position (E)); end Known_Normalized_Position; function Known_Static_Normalized_Position (E : Entity_Id) return B is begin - return Normalized_Position (E) /= No_Uint + return Present (Normalized_Position (E)) and then Normalized_Position (E) >= Uint_0; end Known_Static_Normalized_Position; function Known_RM_Size (E : Entity_Id) return B is begin - return RM_Size (E) /= No_Uint + return Present (RM_Size (E)) and then (RM_Size (E) /= Uint_0 or else Is_Discrete_Type (E) or else Is_Fixed_Point_Type (E)); @@ -506,7 +506,7 @@ package body Einfo.Utils is pragma Assert (not Known_Esize (Id) or else Esize (Id) = V); pragma Assert - (RM_Size (Id) = No_Uint + (No (RM_Size (Id)) or else RM_Size (Id) = Uint_0 or else RM_Size (Id) = V); Set_Esize (Id, UI_From_Int (V)); -- cgit v1.1