aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_aux.ads
diff options
context:
space:
mode:
authorVincent Pucci <pucci@adacore.com>2012-06-14 10:43:53 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2012-06-14 12:43:53 +0200
commit34f3a7014b95e058d68adc1bee2e357e38056dec (patch)
tree70d45c982e7dd024eb7d80959751e61224d87d28 /gcc/ada/sem_aux.ads
parent3cebd1c0afe8c8b1e7120a0d2a5d0ed51a40cec9 (diff)
downloadgcc-34f3a7014b95e058d68adc1bee2e357e38056dec.zip
gcc-34f3a7014b95e058d68adc1bee2e357e38056dec.tar.gz
gcc-34f3a7014b95e058d68adc1bee2e357e38056dec.tar.bz2
einfo.adb einfo.ads (Get_Rep_Item): Removed.
2012-06-14 Vincent Pucci <pucci@adacore.com> * einfo.adb einfo.ads (Get_Rep_Item): Removed. (Get_Rep_Item_For_Entity): Removed. (Get_Rep_Pragma): Removed. (Get_Rep_Pragma_For_Entity): Removed. (Has_Rep_Item): Removed. (Has_Rep_Pragma): Removed. (Has_Rep_Pragma_For_Entity): Removed. * exp_ch9.adb (Expand_N_Task_Type_Declaration): Has_Rep_Pragma_For_Entity replaced by Has_Rep_Pragma and Get_Rep_Pragma_For_Entity replaced by Get_Rep_Pragma. (Make_Task_Create_Call): Has_Rep_Pragma_For_Entity replaced by Has_Rep_Pragma and Get_Rep_Pragma_For_Entity replaced by Get_Rep_Pragma. * exp_intr.adb: Dependency to Sem_Aux added for call to Get_Rep_Pragma. * sem_aux.adb (Get_Rep_Item): New routine. (Get_Rep_Pragma): New routine. (Has_Rep_Item): New routine. (Has_Rep_Pragma): New routine. (Nearest_Ancestor): Minor reformatting. * sem_aux.ads (Get_Rep_Item): New routine. (Get_Rep_Pragma): New routine. (Has_Rep_Item): New routine. (Has_Rep_Pragma): New routine. * sem_ch13.adb (Duplicate_Clause): Restore original error messages. * sem_eval.adb (Subtypes_Statically_Match): Get_Rep_Item_For_Entity replaced by Get_Rep_Item. * sem_prag.adb (Analyze_Pragma): Restore original error messages. (Check_Duplicate_Pragma): Restore original error messages. From-SVN: r188607
Diffstat (limited to 'gcc/ada/sem_aux.ads')
-rw-r--r--gcc/ada/sem_aux.ads47
1 files changed, 47 insertions, 0 deletions
diff --git a/gcc/ada/sem_aux.ads b/gcc/ada/sem_aux.ads
index 9fd9c65..85c70f9 100644
--- a/gcc/ada/sem_aux.ads
+++ b/gcc/ada/sem_aux.ads
@@ -39,6 +39,7 @@
-- require more than minimal semantic knowledge.
with Alloc; use Alloc;
+with Namet; use Namet;
with Table;
with Types; use Types;
@@ -155,6 +156,52 @@ package Sem_Aux is
-- Typ must be a tagged record type. This function returns the Entity for
-- the first _Tag field in the record type.
+ function Get_Rep_Item
+ (E : Entity_Id;
+ Nam : Name_Id;
+ Check_Parents : Boolean := True) return Node_Id;
+ -- Searches the Rep_Item chain for a given entity E, for an instance of a
+ -- rep item (pragma, attribute definition clause, or aspect specification)
+ -- whose name matches the given name Nam. If Check_Parents is False then it
+ -- only returns rep item that has been directly specified to E (and not
+ -- inherited from its parents, if any). If one is found, it is returned,
+ -- otherwise Empty is returned. A special case is that when Nam is
+ -- Name_Priority, the call will also find Interrupt_Priority.
+
+ function Get_Rep_Pragma
+ (E : Entity_Id;
+ Nam : Name_Id;
+ Check_Parents : Boolean := True) return Node_Id;
+ -- Searches the Rep_Item chain for a given entity E, for an instance of a
+ -- representation pragma whose name matches the given name Nam. If
+ -- Check_Parents is False then it only returns representation pragma that
+ -- has been directly specified to E (and not inherited from its parents, if
+ -- any). If one is found, it is returned, otherwise Empty is returned. A
+ -- special case is that when Nam is Name_Priority, the call will also find
+ -- Interrupt_Priority.
+
+ function Has_Rep_Item
+ (E : Entity_Id;
+ Nam : Name_Id;
+ Check_Parents : Boolean := True) return Boolean;
+ -- Searches the Rep_Item chain for the given entity E, for an instance of a
+ -- rep item (pragma, attribute definition clause, or aspect specification)
+ -- with the given name Nam. If Check_Parents is False then it only returns
+ -- rep item that has been directly specified to E (and not inherited from
+ -- its parents, if any). If found then True is returned, otherwise False
+ -- indicates that no matching entry was found.
+
+ function Has_Rep_Pragma
+ (E : Entity_Id;
+ Nam : Name_Id;
+ Check_Parents : Boolean := True) return Boolean;
+ -- Searches the Rep_Item chain for the given entity E, for an instance of a
+ -- representation pragma with the given name Nam. If Check_Parents is False
+ -- then it only returns representation pragma that has been directly
+ -- specified to E (and not inherited from its parents, if any). If found
+ -- then True is returned, otherwise False indicates that no matching entry
+ -- was found.
+
function In_Generic_Body (Id : Entity_Id) return Boolean;
-- Determine whether entity Id appears inside a generic body