aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/einfo-utils.adb
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2021-06-28 20:02:20 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2021-09-20 12:31:37 +0000
commit2175b50b74dd03df45b4efb792029848c4a76381 (patch)
tree178a93d43acd58d98b39459ca33266ffd0b9dab2 /gcc/ada/einfo-utils.adb
parent9613900aef1cdb5c5c3b867825b6295c0b00f4cc (diff)
downloadgcc-2175b50b74dd03df45b4efb792029848c4a76381.zip
gcc-2175b50b74dd03df45b4efb792029848c4a76381.tar.gz
gcc-2175b50b74dd03df45b4efb792029848c4a76381.tar.bz2
[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".
Diffstat (limited to 'gcc/ada/einfo-utils.adb')
-rw-r--r--gcc/ada/einfo-utils.adb20
1 files changed, 10 insertions, 10 deletions
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));