aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ada/einfo-utils.adb5
-rw-r--r--gcc/ada/einfo-utils.ads2
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/einfo-utils.adb b/gcc/ada/einfo-utils.adb
index 88f4d4b..46177ac 100644
--- a/gcc/ada/einfo-utils.adb
+++ b/gcc/ada/einfo-utils.adb
@@ -201,6 +201,11 @@ package body Einfo.Utils is
and then Ekind (Directly_Designated_Type (Id)) = E_Subprogram_Type;
end Is_Access_Subprogram_Type;
+ function Is_Address_Compatible_Type (Id : E) return B is
+ begin
+ return Is_Descendant_Of_Address (Id) or else Id = Standard_Address;
+ end Is_Address_Compatible_Type;
+
function Is_Aggregate_Type (Id : E) return B is
begin
return Ekind (Id) in Aggregate_Kind;
diff --git a/gcc/ada/einfo-utils.ads b/gcc/ada/einfo-utils.ads
index 742ca22..5589276 100644
--- a/gcc/ada/einfo-utils.ads
+++ b/gcc/ada/einfo-utils.ads
@@ -96,6 +96,8 @@ package Einfo.Utils is
function Is_Access_Type (Id : E) return B with Inline;
function Is_Access_Protected_Subprogram_Type (Id : E) return B with Inline;
function Is_Access_Subprogram_Type (Id : E) return B with Inline;
+ function Is_Address_Compatible_Type (Id : E) return B with Inline;
+ -- Check whether the type represents an address
function Is_Aggregate_Type (Id : E) return B with Inline;
function Is_Anonymous_Access_Type (Id : E) return B with Inline;
function Is_Array_Type (Id : E) return B with Inline;