diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-10-20 11:45:29 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-10-20 11:45:29 +0200 |
commit | f06f5f6bd618153d66a028f7be4dbecc22913ac1 (patch) | |
tree | 1b4e5dc7c01c98b0bc9be8ab527f168ad66cd160 /gcc/ada/einfo.adb | |
parent | 40417de8ab869572f58b96b987ad4fca4f0cd783 (diff) | |
download | gcc-f06f5f6bd618153d66a028f7be4dbecc22913ac1.zip gcc-f06f5f6bd618153d66a028f7be4dbecc22913ac1.tar.gz gcc-f06f5f6bd618153d66a028f7be4dbecc22913ac1.tar.bz2 |
[multiple changes]
2015-10-20 Thomas Quinot <quinot@adacore.com>
* types.ads: Minor reformatting.
2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb (Get_Pragma): Minor reformatting. Rename local constant
Is_CDG to Is_CLS. Add pragma Constant_After_Elaboration to the list of
classification pragmas.
2015-10-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Declarations); At the of the visible part,
perform name resolution on the expressions in aspects of visible
entities.
* sem_ch13.ads, sem_ch13.adb (Resolve_Aspect_Expressions): Resolve
expressions in aspects independently of whether corresponding
entity is frozen. Used to complete name resolution of aspect
expressions for entities declared in the visible part of a
package or generic package declaration.
From-SVN: r229028
Diffstat (limited to 'gcc/ada/einfo.adb')
-rw-r--r-- | gcc/ada/einfo.adb | 50 |
1 files changed, 30 insertions, 20 deletions
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb index 6dd5c96..8888d77 100644 --- a/gcc/ada/einfo.adb +++ b/gcc/ada/einfo.adb @@ -6980,30 +6980,40 @@ package body Einfo is ---------------- function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is - Is_CDG : constant Boolean := - Id = Pragma_Abstract_State or else - Id = Pragma_Async_Readers or else - Id = Pragma_Async_Writers or else - Id = Pragma_Depends or else - Id = Pragma_Effective_Reads or else - Id = Pragma_Effective_Writes or else - Id = Pragma_Extensions_Visible or else - Id = Pragma_Global or else - Id = Pragma_Initial_Condition or else - Id = Pragma_Initializes or else - Id = Pragma_Part_Of or else - Id = Pragma_Refined_Depends or else - Id = Pragma_Refined_Global or else - Id = Pragma_Refined_State; + + -- Classification pragmas + + Is_CLS : constant Boolean := + Id = Pragma_Abstract_State or else + Id = Pragma_Async_Readers or else + Id = Pragma_Async_Writers or else + Id = Pragma_Constant_After_Elaboration or else + Id = Pragma_Depends or else + Id = Pragma_Effective_Reads or else + Id = Pragma_Effective_Writes or else + Id = Pragma_Extensions_Visible or else + Id = Pragma_Global or else + Id = Pragma_Initial_Condition or else + Id = Pragma_Initializes or else + Id = Pragma_Part_Of or else + Id = Pragma_Refined_Depends or else + Id = Pragma_Refined_Global or else + Id = Pragma_Refined_State; + + -- Contract / test case pragmas + Is_CTC : constant Boolean := - Id = Pragma_Contract_Cases or else + Id = Pragma_Contract_Cases or else Id = Pragma_Test_Case; + + -- Pre / postcondition pragmas + Is_PPC : constant Boolean := - Id = Pragma_Precondition or else - Id = Pragma_Postcondition or else + Id = Pragma_Precondition or else + Id = Pragma_Postcondition or else Id = Pragma_Refined_Post; - In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC; + In_Contract : constant Boolean := Is_CLS or Is_CTC or Is_PPC; Item : Node_Id; Items : Node_Id; @@ -7018,7 +7028,7 @@ package body Einfo is if No (Items) then return Empty; - elsif Is_CDG then + elsif Is_CLS then Item := Classifications (Items); elsif Is_CTC then |