public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1901] [Ada] Expose symmetry between Known_ and Unknown_ query routines
@ 2021-06-29 14:26 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-06-29 14:26 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:ba4b83c3e3bd44448a85e3771b91ae39421d9dd7
commit r12-1901-gba4b83c3e3bd44448a85e3771b91ae39421d9dd7
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Tue Apr 20 10:53:06 2021 +0200
[Ada] Expose symmetry between Known_ and Unknown_ query routines
gcc/ada/
* einfo-utils.adb
(Unknown_Alignment): Simply negate the Known_ counterpart.
(Unknown_Component_Bit_Offset): Likewise.
(Unknown_Esize): Likewise.
(Unknown_Normalized_First_Bit): Likewise.
(Unknown_Normalized_Position): Likewise.
(Unknown_Normalized_Position_Max): Likewise.
(Unknown_RM_Size): Likewise.
Diff:
---
gcc/ada/einfo-utils.adb | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/gcc/ada/einfo-utils.adb b/gcc/ada/einfo-utils.adb
index 02ccef10f44..6e8a77208b9 100644
--- a/gcc/ada/einfo-utils.adb
+++ b/gcc/ada/einfo-utils.adb
@@ -593,13 +593,12 @@ package body Einfo.Utils is
function Unknown_Alignment (E : Entity_Id) return B is
begin
- return Alignment (E) = Uint_0
- or else Alignment (E) = No_Uint;
+ return not Known_Alignment (E);
end Unknown_Alignment;
function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
begin
- return Component_Bit_Offset (E) = No_Uint;
+ return not Known_Component_Bit_Offset (E);
end Unknown_Component_Bit_Offset;
function Unknown_Component_Size (E : Entity_Id) return B is
@@ -609,32 +608,27 @@ package body Einfo.Utils is
function Unknown_Esize (E : Entity_Id) return B is
begin
- return Esize (E) = No_Uint
- or else
- Esize (E) = Uint_0;
+ return not Known_Esize (E);
end Unknown_Esize;
function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
begin
- return Normalized_First_Bit (E) = No_Uint;
+ return not Known_Normalized_First_Bit (E);
end Unknown_Normalized_First_Bit;
function Unknown_Normalized_Position (E : Entity_Id) return B is
begin
- return Normalized_Position (E) = No_Uint;
+ return not Known_Normalized_Position (E);
end Unknown_Normalized_Position;
function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
begin
- return Normalized_Position_Max (E) = No_Uint;
+ return not Known_Normalized_Position_Max (E);
end Unknown_Normalized_Position_Max;
function Unknown_RM_Size (E : Entity_Id) return B is
begin
- return (RM_Size (E) = Uint_0
- and then not Is_Discrete_Type (E)
- and then not Is_Fixed_Point_Type (E))
- or else RM_Size (E) = No_Uint;
+ return not Known_RM_Size (E);
end Unknown_RM_Size;
--------------------
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-29 14:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29 14:26 [gcc r12-1901] [Ada] Expose symmetry between Known_ and Unknown_ query routines Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).