diff options
author | Yannick Moy <moy@adacore.com> | 2015-05-26 09:35:07 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-05-26 11:35:07 +0200 |
commit | 90a4b3367997dd7327bb1668c0a89c2318e8ef9c (patch) | |
tree | 8066afafdb2ec4a6940ea9c2e31bc092ced59858 /gcc/ada/sem_aux.ads | |
parent | 35fd12d80463c7e5fcc05c2128311f2f0c5b37cc (diff) | |
download | gcc-90a4b3367997dd7327bb1668c0a89c2318e8ef9c.zip gcc-90a4b3367997dd7327bb1668c0a89c2318e8ef9c.tar.gz gcc-90a4b3367997dd7327bb1668c0a89c2318e8ef9c.tar.bz2 |
inline.adb (Has_Initialized_Type): Adapt to new names.
2015-05-26 Yannick Moy <moy@adacore.com>
* inline.adb (Has_Initialized_Type): Adapt to new names.
* sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
Subprogram_Specification): New query functions used in GNATprove.
* sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
query functions used in GNATprove.
* sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
Is_Double_Precision_Floating_Point_Type,
Is_Single_Precision_Floating_Point_Type): New query functions
used in GNATprove.
From-SVN: r223674
Diffstat (limited to 'gcc/ada/sem_aux.ads')
-rw-r--r-- | gcc/ada/sem_aux.ads | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/gcc/ada/sem_aux.ads b/gcc/ada/sem_aux.ads index bb539e2..e3117f2 100644 --- a/gcc/ada/sem_aux.ads +++ b/gcc/ada/sem_aux.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2015, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -158,6 +158,9 @@ package Sem_Aux is -- referencing this entity. It is an error to call this function if Ekind -- (Op) /= E_Operator. + function Get_Low_Bound (E : Entity_Id) return Node_Id; + -- For an index subtype or string literal subtype, return its low bound + function Get_Unary_Nkind (Op : Entity_Id) return Node_Kind; -- Op must be an entity with an Ekind of E_Operator. This function returns -- the Nkind value that would be used to construct a unary operator node @@ -369,6 +372,10 @@ package Sem_Aux is -- The result returned is the next _Tag field in this record, or Empty -- if this is the last such field. + function Number_Components (Typ : Entity_Id) return Pos; + -- Typ is a record type, yields number of components (including + -- discriminants) in type. + function Number_Discriminants (Typ : Entity_Id) return Pos; -- Typ is a type with discriminants, yields number of discriminants in type @@ -381,6 +388,30 @@ package Sem_Aux is -- derived type, and the subtype is not an unconstrained array subtype -- (RM 3.3(23.10/3)). + function Package_Specification (Pack_Id : Entity_Id) return Node_Id; + -- Given an entity for a package or generic package, return corresponding + -- package specification. Simplifies handling of child units, and better + -- than the old idiom: Specification (Unit_Declaration_Node (Pack_Id)). + + function Subprogram_Body (E : Entity_Id) return Node_Id; + -- Given an entity for a subprogram (spec or body), return the + -- corresponding subprogram body if any, or else Empty. + + function Subprogram_Body_Entity (E : Entity_Id) return Entity_Id; + -- Given an entity for a subprogram (spec or body), return the entity + -- corresponding to the subprogram body, which may be the same as E or + -- Empty if no body is available. + + function Subprogram_Spec (E : Entity_Id) return Node_Id; + -- Given an entity for a subprogram spec, return the corresponding + -- subprogram spec if any, or else Empty. + + function Subprogram_Specification (E : Entity_Id) return Node_Id; + -- Given an entity for a subprogram, return the corresponding subprogram + -- specification. If the entity is an inherited subprogram without + -- specification itself, return the specification of the inherited + -- subprogram. + function Ultimate_Alias (Prim : Entity_Id) return Entity_Id; pragma Inline (Ultimate_Alias); -- Return the last entity in the chain of aliased entities of Prim. If Prim @@ -393,9 +424,4 @@ package Sem_Aux is -- it returns the subprogram, task or protected body node for it. The unit -- may be a child unit with any number of ancestors. - function Package_Specification (Pack_Id : Entity_Id) return Node_Id; - -- Given an entity for a package or generic package, return corresponding - -- package specification. Simplifies handling of child units, and better - -- than the old idiom: Specification (Unit_Declaration_Node (Pack_Id)). - end Sem_Aux; |