summaryrefslogtreecommitdiff
path: root/gcc/ada/einfo.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-18 09:20:56 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-18 09:20:56 +0000
commit2301b984d2e7dcd73a56ad3de5d38556a05d9182 (patch)
tree7c869e526e305e1e30c821d62503bbbb521755c4 /gcc/ada/einfo.adb
parentcfded69eea33fe75655775dc4bf388f16d54eb4a (diff)
downloadgcc-2301b984d2e7dcd73a56ad3de5d38556a05d9182.tar.gz
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* sem_prag.adb (Process_Convention): Relax rule on exporting Intrinsic types if Relaxed_RM_Semantics is True. 2016-04-18 Vincent Celier <celier@adacore.com> * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads, checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads, sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb, exp_ch3.ads, exp_unst.adb: Change "descendent" to "descendant" in comments, error messages and identifiers. 2016-04-18 Eric Botcazou <ebotcazou@adacore.com> * sem_type.adb (Operator_Matches_Spec): Call First_Formal on New_S only once at the beginning of the function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235100 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/einfo.adb')
-rw-r--r--gcc/ada/einfo.adb24
1 files changed, 13 insertions, 11 deletions
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb
index b252e8c0b96..a43bff5bf07 100644
--- a/gcc/ada/einfo.adb
+++ b/gcc/ada/einfo.adb
@@ -528,7 +528,7 @@ package body Einfo is
-- Has_Pragma_Preelab_Init Flag221
-- Used_As_Generic_Actual Flag222
- -- Is_Descendent_Of_Address Flag223
+ -- Is_Descendant_Of_Address Flag223
-- Is_Raised Flag224
-- Is_Thunk Flag225
-- Is_Only_Out_Parameter Flag226
@@ -2101,10 +2101,10 @@ package body Einfo is
return Flag132 (Id);
end Is_Default_Init_Cond_Procedure;
- function Is_Descendent_Of_Address (Id : E) return B is
+ function Is_Descendant_Of_Address (Id : E) return B is
begin
return Flag223 (Id);
- end Is_Descendent_Of_Address;
+ end Is_Descendant_Of_Address;
function Is_Discrim_SO_Function (Id : E) return B is
begin
@@ -5102,11 +5102,11 @@ package body Einfo is
Set_Flag132 (Id, V);
end Set_Is_Default_Init_Cond_Procedure;
- procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
+ procedure Set_Is_Descendant_Of_Address (Id : E; V : B := True) is
begin
pragma Assert (Is_Type (Id));
Set_Flag223 (Id, V);
- end Set_Is_Descendent_Of_Address;
+ end Set_Is_Descendant_Of_Address;
procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
begin
@@ -7004,17 +7004,19 @@ package body Einfo is
else
Formal := First_Entity (Id);
+ -- Deal with the common, non-generic case first
+
+ if No (Formal) or else Is_Formal (Formal) then
+ return Formal;
+ end if;
+
-- The first/next entity chain of a generic subprogram contains all
- -- generic formal parameters, followed by the formal parameters. Go
- -- directly to the parameters by skipping the formal part.
+ -- generic formal parameters, followed by the formal parameters.
if Is_Generic_Subprogram (Id) then
while Present (Formal) and then not Is_Formal (Formal) loop
Next_Entity (Formal);
end loop;
- end if;
-
- if Present (Formal) and then Is_Formal (Formal) then
return Formal;
else
return Empty;
@@ -8945,7 +8947,7 @@ package body Einfo is
W ("Is_Controlled", Flag42 (Id));
W ("Is_Controlling_Formal", Flag97 (Id));
W ("Is_Default_Init_Cond_Procedure", Flag132 (Id));
- W ("Is_Descendent_Of_Address", Flag223 (Id));
+ W ("Is_Descendant_Of_Address", Flag223 (Id));
W ("Is_Discrim_SO_Function", Flag176 (Id));
W ("Is_Discriminant_Check_Function", Flag264 (Id));
W ("Is_Dispatch_Table_Entity", Flag234 (Id));