]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Add C declarations for Storage Model support
authorMarc Poulhiès <poulhies@adacore.com>
Thu, 28 Jul 2022 13:57:46 +0000 (15:57 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 6 Oct 2022 09:22:48 +0000 (11:22 +0200)
Add needed C declarations for Storage Model support in gigi.

gcc/ada/

* fe.h (Has_Storage_Model_Type_Aspect)
(Has_Designated_Storage_Model_Aspect, Storage_Model_Object)
(Storage_Model_Copy_From, Storage_Model_Copy_To): Add
declarations.
* sem_util.ads: Add WARNING markers for functions for which a new
C declaration has been added in fe.h

gcc/ada/fe.h
gcc/ada/sem_util.ads

index 02cf105d5e1991bc85ec519fbd1999ffd63c65e0..79a1b58836ec3b1e9375656dd8f07e22e824111b 100644 (file)
@@ -304,17 +304,27 @@ extern Boolean Compile_Time_Known_Value   (Node_Id);
 
 #define Defining_Entity                        sem_util__defining_entity
 #define First_Actual                   sem_util__first_actual
+#define Has_Storage_Model_Type_Aspect  sem_util__storage_model_support__has_storage_model_type_aspect
+#define Has_Designated_Storage_Model_Aspect sem_util__storage_model_support__has_designated_storage_model_aspect
 #define Is_Expression_Function         sem_util__is_expression_function
 #define Is_Variable_Size_Record        sem_util__is_variable_size_record
 #define Needs_Secondary_Stack          sem_util__needs_secondary_stack
 #define Next_Actual                    sem_util__next_actual
+#define Storage_Model_Object           sem_util__storage_model_support__storage_model_object
+#define Storage_Model_Copy_From        sem_util__storage_model_support__storage_model_copy_from
+#define Storage_Model_Copy_To          sem_util__storage_model_support__storage_model_copy_to
 
 extern Entity_Id Defining_Entity               (Node_Id);
 extern Node_Id First_Actual                    (Node_Id);
+extern Boolean Has_Storage_Model_Type_Aspect   (Entity_Id);
+extern Boolean Has_Designated_Storage_Model_Aspect (Entity_Id);
 extern Boolean Is_Expression_Function          (Entity_Id);
 extern Boolean Is_Variable_Size_Record                 (Entity_Id);
 extern Boolean Needs_Secondary_Stack           (Entity_Id);
 extern Node_Id Next_Actual                     (Node_Id);
+extern Entity_Id Storage_Model_Object          (Entity_Id);
+extern Entity_Id Storage_Model_Copy_From       (Entity_Id);
+extern Entity_Id Storage_Model_Copy_To                 (Entity_Id);
 
 /* sinfo: */
 
index 132c2b8cddf3da7c4924a85507d97aa1ef8b5bfb..c23d358e2fbdfb86f8557762d9b36b8c007aeb7f 100644 (file)
@@ -3655,10 +3655,14 @@ package Sem_Util is
       function Has_Storage_Model_Type_Aspect (Typ : Entity_Id) return Boolean;
       --  Returns True iff Typ specifies aspect Storage_Model_Type
 
+      --  WARNING: There is a matching C declaration of this subprogram in fe.h
+
       function Has_Designated_Storage_Model_Aspect
         (Typ : Entity_Id) return Boolean;
       --  Returns True iff Typ specifies aspect Designated_Storage_Model
 
+      --  WARNING: There is a matching C declaration of this subprogram in fe.h
+
       function Storage_Model_Object (Typ : Entity_Id) return Entity_Id;
       --  Given an access type Typ with aspect Designated_Storage_Model,
       --  returns the storage-model object associated with that type.
@@ -3666,6 +3670,8 @@ package Sem_Util is
       --  other functions declared in this interface to retrieve operations
       --  associated with Storage_Model_Type aspect of the object's type.
 
+      --  WARNING: There is a matching C declaration of this subprogram in fe.h
+
       function Storage_Model_Type (Obj : Entity_Id) return Entity_Id;
       --  Given an object Obj of a type specifying aspect Storage_Model_Type,
       --  returns that type.
@@ -3715,12 +3721,16 @@ package Sem_Util is
       --  type, returns the procedure specified for the Copy_From choice in
       --  that aspect; returns Empty if the procedure isn't specified.
 
+      --  WARNING: There is a matching C declaration of this subprogram in fe.h
+
       function Storage_Model_Copy_To
         (SM_Obj_Or_Type : Entity_Id) return Entity_Id;
       --  Given a type with aspect Storage_Model_Type or an object of such a
       --  type, returns the procedure specified for the Copy_To choice in that
       --  aspect; returns Empty if the procedure isn't specified.
 
+      --  WARNING: There is a matching C declaration of this subprogram in fe.h
+
       function Storage_Model_Storage_Size
         (SM_Obj_Or_Type : Entity_Id) return Entity_Id;
       --  Given a type with aspect Storage_Model_Type or an object of such a