aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sinput-l.adb
diff options
context:
space:
mode:
authorHristian Kirtchev <kirtchev@adacore.com>2016-07-04 10:19:10 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2016-07-04 12:19:10 +0200
commitc308e7620eccfbb8f0b5859aab351e3192d761c1 (patch)
tree517b604b4f76308f98fafb0a39765f69077d51e7 /gcc/ada/sinput-l.adb
parentf50f7e2c00bb3cbf404b241d88af8697b33d2279 (diff)
downloadgcc-c308e7620eccfbb8f0b5859aab351e3192d761c1.zip
gcc-c308e7620eccfbb8f0b5859aab351e3192d761c1.tar.gz
gcc-c308e7620eccfbb8f0b5859aab351e3192d761c1.tar.bz2
sem_ch3.adb, [...]: Minor reformatting.
2016-07-04 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch3.adb, sem_type.adb, sem_ch12.adb, xref_lib.adb, freeze.adb, sinput-l.adb, sinput-l.ads, sem_ch4.adb, sem_ch8.adb: Minor reformatting. From-SVN: r237965
Diffstat (limited to 'gcc/ada/sinput-l.adb')
-rw-r--r--gcc/ada/sinput-l.adb42
1 files changed, 22 insertions, 20 deletions
diff --git a/gcc/ada/sinput-l.adb b/gcc/ada/sinput-l.adb
index f0cce8d..aa9acb8 100644
--- a/gcc/ada/sinput-l.adb
+++ b/gcc/ada/sinput-l.adb
@@ -91,7 +91,10 @@ package body Sinput.L is
-- Adjust_Instantiation_Sloc --
-------------------------------
- procedure Adjust_Instantiation_Sloc (N : Node_Id; A : Sloc_Adjustment) is
+ procedure Adjust_Instantiation_Sloc
+ (N : Node_Id;
+ Factor : Sloc_Adjustment)
+ is
Loc : constant Source_Ptr := Sloc (N);
begin
@@ -100,8 +103,8 @@ package body Sinput.L is
-- case, but in practice there seem to be some nodes that get copied
-- twice, and this is a defence against that happening.
- if A.Lo <= Loc and then Loc <= A.Hi then
- Set_Sloc (N, Loc + A.Adjust);
+ if Factor.Lo <= Loc and then Loc <= Factor.Hi then
+ Set_Sloc (N, Loc + Factor.Adjust);
end if;
end Adjust_Instantiation_Sloc;
@@ -123,7 +126,7 @@ package body Sinput.L is
procedure Create_Instantiation_Source
(Inst_Node : Entity_Id;
Template_Id : Entity_Id;
- A : out Sloc_Adjustment;
+ Factor : out Sloc_Adjustment;
Inlined_Body : Boolean := False;
Inherited_Pragma : Boolean := False)
is
@@ -132,9 +135,9 @@ package body Sinput.L is
Xnew : Source_File_Index;
begin
- Xold := Get_Source_File_Index (Sloc (Template_Id));
- A.Lo := Source_File.Table (Xold).Source_First;
- A.Hi := Source_File.Table (Xold).Source_Last;
+ Xold := Get_Source_File_Index (Sloc (Template_Id));
+ Factor.Lo := Source_File.Table (Xold).Source_First;
+ Factor.Hi := Source_File.Table (Xold).Source_Last;
Source_File.Append (Source_File.Table (Xold));
Xnew := Source_File.Last;
@@ -209,22 +212,22 @@ package body Sinput.L is
end if;
end if;
- -- Now we need to compute the new values of Source_First and
- -- Source_Last and adjust the source file pointer to have the
- -- correct virtual origin for the new range of values.
+ -- Now compute the new values of Source_First and Source_Last and
+ -- adjust the source file pointer to have the correct virtual origin
+ -- for the new range of values.
- -- Source_First must be greater than the last Source_Last value
- -- and also must be a multiple of Source_Align
+ -- Source_First must be greater than the last Source_Last value and
+ -- also must be a multiple of Source_Align.
Snew.Source_First :=
((Source_File.Table (Xnew - 1).Source_Last + Source_Align) /
Source_Align) * Source_Align;
- A.Adjust := Snew.Source_First - A.Lo;
- Snew.Source_Last := A.Hi + A.Adjust;
+ Factor.Adjust := Snew.Source_First - Factor.Lo;
+ Snew.Source_Last := Factor.Hi + Factor.Adjust;
Set_Source_File_Index_Table (Xnew);
- Snew.Sloc_Adjust := Sold.Sloc_Adjust - A.Adjust;
+ Snew.Sloc_Adjust := Sold.Sloc_Adjust - Factor.Adjust;
if Debug_Flag_L then
Write_Eol;
@@ -258,7 +261,6 @@ package body Sinput.L is
Write_Str ("body of package ");
else pragma Assert (Ekind (Template_Id) = E_Subprogram_Body);
-
if Nkind (Dnod) = N_Procedure_Specification then
Write_Str ("body of procedure ");
else
@@ -282,11 +284,11 @@ package body Sinput.L is
Write_Eol;
Write_Str (" old lo = ");
- Write_Int (Int (A.Lo));
+ Write_Int (Int (Factor.Lo));
Write_Eol;
Write_Str (" old hi = ");
- Write_Int (Int (A.Hi));
+ Write_Int (Int (Factor.Hi));
Write_Eol;
Write_Str (" new lo = ");
@@ -298,7 +300,7 @@ package body Sinput.L is
Write_Eol;
Write_Str (" adjustment factor = ");
- Write_Int (Int (A.Adjust));
+ Write_Int (Int (Factor.Adjust));
Write_Eol;
Write_Str (" instantiation location: ");
@@ -328,7 +330,7 @@ package body Sinput.L is
begin
Snew.Source_Text :=
To_Source_Buffer_Ptr
- (Sold.Source_Text (-A.Adjust)'Address);
+ (Sold.Source_Text (-Factor.Adjust)'Address);
end;
end;
end Create_Instantiation_Source;