diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-26 11:29:13 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-26 11:29:13 +0000 |
commit | 69e9658f15f25f869cc33fc2d85c86198fe0564d (patch) | |
tree | fd072a2f475cd63b318fce31b41facdc1f06f19f /gcc/ada/sem_util.adb | |
parent | c02dccca74671754ef78a498810507c0d6899b4a (diff) | |
download | gcc-69e9658f15f25f869cc33fc2d85c86198fe0564d.tar.gz |
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
* inline.adb: Minor reformatting.
2015-10-26 Yannick Moy <moy@adacore.com>
* get_spark_xrefs.adb (get_SPARK_Xrefs): Remove obsolete
assertion.
* lib-xref-spark_specific.adb (Traverse_Declaration_Or_Statement):
New procedure to factor duplicated code and add
treatment of protected entries.
(Add_SPARK_Scope, Traverse_Declarations_Or_Statements): Call the new
procedure Traverse_Declaration_Or_Statement. Use same character used in
normal xrefs for SPARK xrefs, for a given entity used as scope.
* spark_xrefs.ads Document character used for entries.
* sem_prag.adb (Check_Loop_Pragma_Placement): Account for possible
introduction of declarations and statements by the expansion, between
two otherwise consecutive loop pragmas.
* sem_util.ads, sem_util.adb (Is_Suspension_Object): Lifted from nested
function.
(Is_Descendant_Of_Suspension_Object): nested function lifted.
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
* sem_attr.adb (Eval_Attribute): Attribute 'Enum_Rep can be folded
when its prefix denotes a constant, an enumeration literal or
an enumeration type. Use the expression of the attribute in the
enumeration type form, otherwise use the prefix to fold.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229334 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r-- | gcc/ada/sem_util.adb | 53 |
1 files changed, 22 insertions, 31 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index de8472af9a4..2332bb32ab7 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -11309,40 +11309,9 @@ package body Sem_Util is function Is_Descendant_Of_Suspension_Object (Typ : Entity_Id) return Boolean is - function Is_Suspension_Object (Id : Entity_Id) return Boolean; - -- Determine whether arbitrary entity Id denotes Suspension_Object - -- defined in Ada.Synchronous_Task_Control. - - -------------------------- - -- Is_Suspension_Object -- - -------------------------- - - function Is_Suspension_Object (Id : Entity_Id) return Boolean is - begin - -- This approach does an exact name match rather than to rely on - -- RTSfind. Routine Is_Effectively_Volatile is used by clients of - -- the front end at point where all auxiliary tables are locked - -- and any modifications to them are treated as violations. Do not - -- tamper with the tables, instead examine the Chars fields of all - -- the scopes of Id. - - return - Chars (Id) = Name_Suspension_Object - and then Present (Scope (Id)) - and then Chars (Scope (Id)) = Name_Synchronous_Task_Control - and then Present (Scope (Scope (Id))) - and then Chars (Scope (Scope (Id))) = Name_Ada - and then Present (Scope (Scope (Scope (Id)))) - and then Scope (Scope (Scope (Id))) = Standard_Standard; - end Is_Suspension_Object; - - -- Local variables - Cur_Typ : Entity_Id; Par_Typ : Entity_Id; - -- Start of processing for Is_Descendant_Of_Suspension_Object - begin -- Climb the type derivation chain checking each parent type against -- Suspension_Object. @@ -13161,6 +13130,28 @@ package body Sem_Util is and then Ekind (Defining_Entity (N)) /= E_Subprogram_Body; end Is_Subprogram_Stub_Without_Prior_Declaration; + -------------------------- + -- Is_Suspension_Object -- + -------------------------- + + function Is_Suspension_Object (Id : Entity_Id) return Boolean is + begin + -- This approach does an exact name match rather than to rely on + -- RTSfind. Routine Is_Effectively_Volatile is used by clients of the + -- front end at point where all auxiliary tables are locked and any + -- modifications to them are treated as violations. Do not tamper with + -- the tables, instead examine the Chars fields of all the scopes of Id. + + return + Chars (Id) = Name_Suspension_Object + and then Present (Scope (Id)) + and then Chars (Scope (Id)) = Name_Synchronous_Task_Control + and then Present (Scope (Scope (Id))) + and then Chars (Scope (Scope (Id))) = Name_Ada + and then Present (Scope (Scope (Scope (Id)))) + and then Scope (Scope (Scope (Id))) = Standard_Standard; + end Is_Suspension_Object; + --------------------------------- -- Is_Synchronized_Tagged_Type -- --------------------------------- |