diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-29 15:38:55 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-29 15:38:55 +0200 |
commit | 3e24afaa6a24e1955ad0f3cd1ca00b6edec67a67 (patch) | |
tree | c5c5a59fe92af48a72ef4d23e699ecfeee3903ef /gcc/ada/aspects.adb | |
parent | 3ddd922ebf36fb7d4701e8f55e633d27fca54296 (diff) | |
download | gcc-3e24afaa6a24e1955ad0f3cd1ca00b6edec67a67.zip gcc-3e24afaa6a24e1955ad0f3cd1ca00b6edec67a67.tar.gz gcc-3e24afaa6a24e1955ad0f3cd1ca00b6edec67a67.tar.bz2 |
[multiple changes]
2011-08-29 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb: Remove Build_Explicit_Dereference.
* sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
from sem_res.adb, used in analysis of additional constructs.
(Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
expansion of iterators.
(Is_Object_Reference): Recognize variables rewritten as explicit
dereferences in Ada2012.
* snames.ads-tmpl: Add Has_Element, Forward_Iterator,
Reversible_Iterator names, for expansion of Ada2012 iterators.
* aspects.ads, aspects.adb (Find_Aspect): Utility.
* a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
linked list container.
* a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
* a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
2011-08-29 Ed Schonberg <schonberg@adacore.com>
* a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
containers.
2011-08-29 Vincent Celier <celier@adacore.com>
* make.adb (Gnatmake): Get the maximum number of simultaneous
compilation processes after the Builder switches has been scanned, as
there may include -jnn.
2011-08-29 Matthew Heaney <heaney@adacore.com>
* a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
2011-08-29 Tristan Gingold <gingold@adacore.com>
* gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
GNAT_DRIVER_COMMAND_LINE to 255.
2011-08-29 Pascal Obry <obry@adacore.com>
* freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
reformatting and style fix (class attribute casing).
2011-08-29 Yannick Moy <moy@adacore.com>
* exp_ch11.adb: Yet another case where expansion should be common
between CodePeer and Alfa.
2011-08-29 Yannick Moy <moy@adacore.com>
* exp_ch9.adb: Partial revert of previous change for Alfa mode.
2011-08-29 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Matches_Limited_With_View): The limited views of an
incomplete type and its completion match.
From-SVN: r178228
Diffstat (limited to 'gcc/ada/aspects.adb')
-rwxr-xr-x | gcc/ada/aspects.adb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/ada/aspects.adb b/gcc/ada/aspects.adb index 43d0df6..f2159db 100755 --- a/gcc/ada/aspects.adb +++ b/gcc/ada/aspects.adb @@ -30,6 +30,7 @@ ------------------------------------------------------------------------------ with Atree; use Atree; +with Einfo; use Einfo; with Nlists; use Nlists; with Sinfo; use Sinfo; with Tree_IO; use Tree_IO; @@ -118,6 +119,32 @@ package body Aspects is return Aspect_Id_Hash_Table.Get (Name); end Get_Aspect_Id; + ----------------- + -- Find_Aspect -- + ----------------- + + function Find_Aspect (Ent : Entity_Id; A : Aspect_Id) return Node_Id is + Ritem : Node_Id; + + begin + Ritem := First_Rep_Item (Ent); + while Present (Ritem) loop + if Nkind (Ritem) = N_Aspect_Specification + and then Get_Aspect_Id (Chars (Identifier (Ritem))) = A + then + if A = Aspect_Default_Iterator then + return Expression (Aspect_Rep_Item (Ritem)); + else + return Expression (Ritem); + end if; + end if; + + Next_Rep_Item (Ritem); + end loop; + + return Empty; + end Find_Aspect; + ------------------ -- Move_Aspects -- ------------------ |