diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-21 10:33:36 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-21 10:33:36 +0000 |
commit | 4aed540562efe2aad5c88db9dabb4ef36296ccc2 (patch) | |
tree | 863959b3591a8287474cac0afa935f60a6b29c92 /gcc/ada/sem_ch13.ads | |
parent | f54f1dff2ff9c50f6403ff7d603db4dca4d8caa0 (diff) | |
download | gcc-4aed540562efe2aad5c88db9dabb4ef36296ccc2.tar.gz |
2010-10-21 Robert Dewar <dewar@adacore.com>
* einfo.ads, einfo.adb: Add handling of predicates.
Rework handling of invariants.
* exp_ch3.adb, exp_ch4.adb, exp_util.adb, sem_ch6.adb: Minor changes to
handing of invariants.
* par-prag.adb: Add dummy entry for pragma Predicate
* sem_ch13.adb (Analyze_Aspect_Specifications): Add processing for
Predicate aspects.
* sem_prag.adb: Add implementation of pragma Predicate.
* snames.ads-tmpl: Add entries for pragma Predicate.
2010-10-21 Robert Dewar <dewar@adacore.com>
* elists.adb: Minor reformatting.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165764 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch13.ads')
-rw-r--r-- | gcc/ada/sem_ch13.ads | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/gcc/ada/sem_ch13.ads b/gcc/ada/sem_ch13.ads index 85a9085518e..46d6cb8a94a 100644 --- a/gcc/ada/sem_ch13.ads +++ b/gcc/ada/sem_ch13.ads @@ -57,11 +57,25 @@ package Sem_Ch13 is PDecl : out Node_Id; PBody : out Node_Id); -- If Typ has Invariants (indicated by Has_Invariants being set for Typ, - -- indicating the presence of Pragma Invariant entries on the rep chain, + -- indicating the presence of pragma Invariant entries on the rep chain, -- note that Invariant aspects are converted to pragma Invariant), then -- this procedure builds the spec and body for the corresponding Invariant - -- procedure, returning themn in PDecl and PBody. In some error situations - -- no procedure is built, in which case PDecl/PBody are empty on return. + -- procedure, returning themn in PDecl and PBody. Invariant_Procedure is + -- set for Typ. In some error situations no procedure is built, in which + -- case PDecl/PBody are empty on return. + + procedure Build_Predicate_Function + (Typ : Entity_Id; + FDecl : out Node_Id; + FBody : out Node_Id); + -- If Typ has predicates (indicated by Has_Predicates being set for Typ, + -- then either there are pragma Invariant entries on the rep chain for the + -- type (note that Predicate aspects are converted to pragam Predicate), or + -- there are inherited aspects from a parent type, or ancestor subtypes, + -- or interfaces. This procedure builds the spec and body for the Predicate + -- function that tests these predicates, returning them in PDecl and Pbody + -- and setting Predicate_Procedure for Typ. In some error situations no + -- procedure is built, in which case PDecl/PBody are empty on return. procedure Check_Record_Representation_Clause (N : Node_Id); -- This procedure completes the analysis of a record representation clause |