aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/prj-nmsc.adb
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2014-07-30 14:25:36 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2014-07-30 16:25:36 +0200
commit2e471ec7641db7c5f0291f1b90de6ccecc1aea4a (patch)
tree3615f8b94b97c8c811f1c6984b26a012fadea153 /gcc/ada/prj-nmsc.adb
parent43174f1527277ef15d1ebb5c50773ab89cbd2ba9 (diff)
downloadgcc-2e471ec7641db7c5f0291f1b90de6ccecc1aea4a.zip
gcc-2e471ec7641db7c5f0291f1b90de6ccecc1aea4a.tar.gz
gcc-2e471ec7641db7c5f0291f1b90de6ccecc1aea4a.tar.bz2
sem_ch3.ads, [...]: Minor reformatting.
2014-07-30 Robert Dewar <dewar@adacore.com> * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting. From-SVN: r213283
Diffstat (limited to 'gcc/ada/prj-nmsc.adb')
-rw-r--r--gcc/ada/prj-nmsc.adb84
1 files changed, 31 insertions, 53 deletions
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb
index 6f8b713..c975e19 100644
--- a/gcc/ada/prj-nmsc.adb
+++ b/gcc/ada/prj-nmsc.adb
@@ -547,12 +547,9 @@ package body Prj.Nmsc is
while J <= Str'Last loop
Name_Len := Name_Len + 1;
- if J <= Max
- and then Str (J .. J + Pattern'Length - 1) = Pattern
- then
+ if J <= Max and then Str (J .. J + Pattern'Length - 1) = Pattern then
Name_Buffer (Name_Len) := Replacement;
J := J + Pattern'Length;
-
else
Name_Buffer (Name_Len) := GNAT.Case_Util.To_Lower (Str (J));
J := J + 1;
@@ -738,8 +735,7 @@ package body Prj.Nmsc is
-- the same file name in unrelated projects.
elsif Is_Extending (Project, Source.Project) then
- if not Locally_Removed
- and then Naming_Exception /= Inherited
+ if not Locally_Removed and then Naming_Exception /= Inherited
then
Source_To_Replace := Source;
end if;
@@ -2403,7 +2399,8 @@ package body Prj.Nmsc is
Lang_Index.Config.Toolchain_Version :=
Element.Value.Value;
- -- For Ada, set proper checksum computation mode
+ -- For Ada, set proper checksum computation mode,
+ -- which has changed from version to version.
if Lang_Index.Name = Name_Ada then
declare
@@ -2432,7 +2429,7 @@ package body Prj.Nmsc is
then
Checksum_GNAT_5_03 := True;
- -- Version 5.02 or earlier
+ -- Version 5.02 or earlier (no checksums)
if Vers (6) /= '5'
or else Vers (Vers'Last) < '3'
@@ -3355,7 +3352,7 @@ package body Prj.Nmsc is
Project.Library :=
Project.Library_Dir /= No_Path_Information
- and then Project.Library_Name /= No_Name;
+ and then Project.Library_Name /= No_Name;
if Project.Extends = No_Project then
case Project.Qualifier is
@@ -5016,7 +5013,7 @@ package body Prj.Nmsc is
Error_Msg_Warn :=
Project.Symbol_Data.Symbol_Policy /= Controlled
- and then Project.Symbol_Data.Symbol_Policy /= Direct;
+ and then Project.Symbol_Data.Symbol_Policy /= Direct;
Error_Msg
(Data.Flags,
@@ -5432,12 +5429,10 @@ package body Prj.Nmsc is
No_Sources : constant Boolean :=
((not Source_Files.Default
and then Source_Files.Values = Nil_String)
- or else
- (not Source_Dirs.Default
- and then Source_Dirs.Values = Nil_String)
- or else
- (not Languages.Default
- and then Languages.Values = Nil_String))
+ or else (not Source_Dirs.Default
+ and then Source_Dirs.Values = Nil_String)
+ or else (not Languages.Default
+ and then Languages.Values = Nil_String))
and then Project.Extends = No_Project;
-- Start of processing for Get_Directories
@@ -5502,6 +5497,7 @@ package body Prj.Nmsc is
if not Dir_Exists and then not Project.Externally_Built then
if Opt.Directories_Must_Exist_In_Projects then
+
-- The object directory does not exist, report an error if
-- the project is not externally built.
@@ -5613,8 +5609,7 @@ package body Prj.Nmsc is
pragma Assert (Source_Dirs.Kind = List, "Source_Dirs is not a list");
- if not Source_Files.Default
- and then Source_Files.Values = Nil_String
+ if not Source_Files.Default and then Source_Files.Values = Nil_String
then
Project.Source_Dirs := Nil_String;
@@ -5779,9 +5774,7 @@ package body Prj.Nmsc is
-- A non empty, non comment line should contain a file name
- if Last /= 0
- and then (Last = 1 or else Line (1 .. 2) /= "--")
- then
+ if Last /= 0 and then (Last = 1 or else Line (1 .. 2) /= "--") then
Name_Len := Last;
Name_Buffer (1 .. Name_Len) := Line (1 .. Last);
Canonical_Case_File_Name (Name_Buffer (1 .. Name_Len));
@@ -5964,20 +5957,15 @@ package body Prj.Nmsc is
-- In the standard GNAT naming scheme, check for special cases: children
-- or separates of A, G, I or S, and run time sources.
- if Is_Standard_GNAT_Naming (Naming)
- and then Name_Len >= 3
- then
+ if Is_Standard_GNAT_Naming (Naming) and then Name_Len >= 3 then
declare
S1 : constant Character := Name_Buffer (1);
S2 : constant Character := Name_Buffer (2);
S3 : constant Character := Name_Buffer (3);
begin
- if S1 = 'a'
- or else S1 = 'g'
- or else S1 = 'i'
- or else S1 = 's'
- then
+ if S1 = 'a' or else S1 = 'g' or else S1 = 'i' or else S1 = 's' then
+
-- Children or separates of packages A, G, I or S. These names
-- are x__ ... or x~... (where x is a, g, i, or s). Both
-- versions (x__... and x~...) are allowed in all platforms,
@@ -6045,9 +6033,7 @@ package body Prj.Nmsc is
end if;
end if;
- if Unit /= No_Name
- and then Current_Verbosity = High
- then
+ if Unit /= No_Name and then Current_Verbosity = High then
case Kind is
when Spec => Debug_Output ("spec of", Unit);
when Impl => Debug_Output ("body of", Unit);
@@ -6507,8 +6493,7 @@ package body Prj.Nmsc is
if Project.Project.Extends = No_Project
and then
Project.Project.Object_Directory = Project.Project.Directory
- and then
- not (Project.Project.Qualifier = Aggregate_Library)
+ and then not (Project.Project.Qualifier = Aggregate_Library)
then
Project.Project.Object_Directory := No_Path_Information;
end if;
@@ -6638,7 +6623,9 @@ package body Prj.Nmsc is
(Project.Source_Names, Source.File);
if NL /= No_Name_Location and then not NL.Listed then
+
-- Remove the exception
+
Source_Names_Htable.Set
(Project.Source_Names,
Source.File,
@@ -6983,9 +6970,7 @@ package body Prj.Nmsc is
Source.Kind := Kind;
- if Current_Verbosity = High
- and then Source.File /= No_File
- then
+ if Current_Verbosity = High and then Source.File /= No_File then
Debug_Output ("override kind for "
& Get_Name_String (Source.File)
& " idx=" & Source.Index'Img
@@ -7154,8 +7139,7 @@ package body Prj.Nmsc is
-- A file name in a list must be a source of a language
- if Data.Flags.Error_On_Unknown_Language
- and then Name_Loc.Found
+ if Data.Flags.Error_On_Unknown_Language and then Name_Loc.Found
then
Error_Msg_File_1 := File_Name;
Error_Msg
@@ -7322,10 +7306,7 @@ package body Prj.Nmsc is
Read (Dir, Name, Last);
exit when Last = 0;
- if Name (1 .. Last) /= "."
- and then
- Name (1 .. Last) /= ".."
- then
+ if Name (1 .. Last) /= "." and then Name (1 .. Last) /= ".." then
declare
Path_Name : constant String :=
Normalize_Pathname
@@ -7333,8 +7314,9 @@ package body Prj.Nmsc is
Directory => Path_Str,
Resolve_Links => Resolve_Links)
& Directory_Separator;
- Path2 : Path_Information;
- OK : Boolean := True;
+
+ Path2 : Path_Information;
+ OK : Boolean := True;
begin
if Is_Directory (Path_Name) then
@@ -7446,8 +7428,8 @@ package body Prj.Nmsc is
Pattern_End - 1 >= Pattern'First
and then Pattern (Pattern_End - 1 .. Pattern_End) = "**"
and then (Pattern_End - 1 = Pattern'First
- or else Pattern (Pattern_End - 2) = '/'
- or else Pattern (Pattern_End - 2) = Directory_Separator);
+ or else Pattern (Pattern_End - 2) = '/'
+ or else Pattern (Pattern_End - 2) = Directory_Separator);
if Recursive then
Pattern_End := Pattern_End - 2;
@@ -7820,9 +7802,7 @@ package body Prj.Nmsc is
Continuation : Boolean := False;
Iter : Source_Iterator;
begin
- if not Project.Project.Externally_Built
- and then not Extending
- then
+ if not Project.Project.Externally_Built and then not Extending then
Language := Project.Project.Languages;
while Language /= No_Language_Index loop
@@ -8137,11 +8117,9 @@ package body Prj.Nmsc is
-- unit name is not null.
if Src.Kind /= Sep and then Src.Unit_Name /= No_Name then
-
declare
UData : Unit_Index :=
- Units_Htable.Get
- (Data.Tree.Units_HT, Src.Unit_Name);
+ Units_Htable.Get (Data.Tree.Units_HT, Src.Unit_Name);
begin
if UData = No_Unit_Index then
UData := new Unit_Data;