[Ada] Minor reformatting

2018-06-11  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

	* exp_ch11.adb, exp_unst.adb, inline.adb, sem_ch12.adb, sem_util.adb:
	Minor reformatting.
	* sinfo.ads: Fix a typo.

From-SVN: r261403
This commit is contained in:
Hristian Kirtchev 2018-06-11 09:17:13 +00:00 committed by Pierre-Marie de Rodat
parent d1ec7de559
commit 6778c2ca7b
7 changed files with 51 additions and 38 deletions

View File

@ -1,3 +1,9 @@
2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch11.adb, exp_unst.adb, inline.adb, sem_ch12.adb, sem_util.adb:
Minor reformatting.
* sinfo.ads: Fix a typo.
2018-06-11 Ed Schonberg <schonberg@adacore.com>
* inline.adb (Expand_Inlined_Call): If no optimization level is

View File

@ -913,8 +913,8 @@ package body Exp_Ch11 is
Cond := Condition (Raise_S);
-- The only other possibility is a node that is or used to be a
-- simple raise statement. Note that the string expression in
-- the original Raise statement is ignored.
-- simple raise statement. Note that the string expression in the
-- original Raise statement is ignored.
else
Orig := Original_Node (Raise_S);

View File

@ -1194,8 +1194,8 @@ package body Exp_Unst is
Decl : Node_Id;
begin
-- Subprograms declared in tasks and protected types
-- are reachable and cannot be eliminated.
-- Subprograms declared in tasks and protected types are
-- reachable and cannot be eliminated.
if In_Synchronized_Unit (STJ.Ent) then
STJ.Reachable := True;

View File

@ -2269,28 +2269,39 @@ package body Inline is
Subp : Entity_Id;
Orig_Subp : Entity_Id)
is
Loc : constant Source_Ptr := Sloc (N);
Is_Predef : constant Boolean :=
Is_Predefined_Unit (Get_Source_Unit (Subp));
Orig_Bod : constant Node_Id :=
Decls : constant List_Id := New_List;
Is_Predef : constant Boolean :=
Is_Predefined_Unit (Get_Source_Unit (Subp));
Loc : constant Source_Ptr := Sloc (N);
Orig_Bod : constant Node_Id :=
Body_To_Inline (Unit_Declaration_Node (Subp));
Uses_Back_End : constant Boolean :=
Back_End_Inlining and then Optimization_Level > 0;
Back_End_Inlining and then Optimization_Level > 0;
-- The back-end expansion is used if the target supports back-end
-- inlining and some level of optimixation is required; otherwise
-- the inlining takes place fully as a tree expansion.
Blk : Node_Id;
Decl : Node_Id;
Decls : constant List_Id := New_List;
Exit_Lab : Entity_Id := Empty;
Exit_Lab : Entity_Id := Empty;
F : Entity_Id;
A : Node_Id;
Lab_Decl : Node_Id := Empty;
Lab_Decl : Node_Id := Empty;
Lab_Id : Node_Id;
New_A : Node_Id;
Num_Ret : Nat := 0;
Num_Ret : Nat := 0;
Ret_Type : Entity_Id;
Temp : Entity_Id;
Temp_Typ : Entity_Id;
Is_Unc : Boolean;
Is_Unc_Decl : Boolean;
-- If the type returned by the function is unconstrained and the call
-- can be inlined, special processing is required.
Return_Object : Entity_Id := Empty;
-- Entity in declaration in an extended_return_statement
Targ : Node_Id := Empty;
-- The target of the call. If context is an assignment statement then
@ -2300,17 +2311,6 @@ package body Inline is
Targ1 : Node_Id := Empty;
-- A separate target used when the return type is unconstrained
Temp : Entity_Id;
Temp_Typ : Entity_Id;
Return_Object : Entity_Id := Empty;
-- Entity in declaration in an extended_return_statement
Is_Unc : Boolean;
Is_Unc_Decl : Boolean;
-- If the type returned by the function is unconstrained and the call
-- can be inlined, special processing is required.
procedure Declare_Postconditions_Result;
-- When generating C code, declare _Result, which may be used in the
-- inlined _Postconditions procedure to verify the return value.
@ -2963,20 +2963,22 @@ package body Inline is
begin
First_Decl := First (Declarations (Blk));
-- If the body is a single extended return statement,
-- the resulting block is a nested block.
-- If the body is a single extended return statement,the
-- resulting block is a nested block.
if No (First_Decl) then
First_Decl := First
(Statements (Handled_Statement_Sequence (Blk)));
First_Decl :=
First (Statements (Handled_Statement_Sequence (Blk)));
if Nkind (First_Decl) = N_Block_Statement then
First_Decl := First (Declarations (First_Decl));
end if;
end if;
-- No front-end inlining possible
if Nkind (First_Decl) /= N_Object_Declaration then
return; -- No front-end inlining possible,
return;
end if;
if Nkind (Parent (N)) /= N_Assignment_Statement then

View File

@ -9533,7 +9533,7 @@ package body Sem_Ch12 is
-- the corresponding private part.
if Parent (List_Containing (Get_Unit_Instantiation_Node (Par)))
= Parent (List_Containing (N))
= Parent (List_Containing (N))
and then Sloc (Freeze_Node (Par)) < Sloc (N)
then
Insert_Freeze_Node_For_Instance (N, F_Node);

View File

@ -8334,13 +8334,18 @@ package body Sem_Util is
-- Search for the equality primitive; return Empty if the primitive is
-- not found.
------------------
-- Find_Eq_Prim --
------------------
function Find_Eq_Prim (Prims_List : Elist_Id) return Entity_Id is
Prim_E : Elmt_Id := First_Elmt (Prims_List);
Prim : Entity_Id;
Prim : Entity_Id;
Prim_Elmt : Elmt_Id;
begin
while Present (Prim_E) loop
Prim := Node (Prim_E);
Prim_Elmt := First_Elmt (Prims_List);
while Present (Prim_Elmt) loop
Prim := Node (Prim_Elmt);
-- Locate primitive equality with the right signature
@ -8352,7 +8357,7 @@ package body Sem_Util is
return Prim;
end if;
Next_Elmt (Prim_E);
Next_Elmt (Prim_Elmt);
end loop;
return Empty;
@ -8360,8 +8365,8 @@ package body Sem_Util is
-- Local Variables
Full_Type : Entity_Id;
Eq_Prim : Entity_Id;
Full_Type : Entity_Id;
-- Start of processing for Find_Primitive_Eq
@ -19320,7 +19325,7 @@ package body Sem_Util is
begin
-- No marker needs to be created when switch -gnatH (legacy elaboration
-- checking mode enabled) is in effect because the legacy ABE mechanism
-- does use markers.
-- does not use markers.
if Legacy_Elaboration_Checks then
return False;

View File

@ -2371,7 +2371,7 @@ package Sinfo is
-- Split_PPC (Flag17)
-- When a Pre or Post aspect specification is processed, it is broken
-- into AND THEN sections. The left most section has Split_PPC set to
-- into AND THEN sections. The leftmost section has Split_PPC set to
-- False, indicating that it is the original specification (e.g. for
-- posting errors). For other sections, Split_PPC is set to True.
-- This flag is set in both the N_Aspect_Specification node itself,