gnatfind.adb, [...]: Minor reformatting and code clean up.
2009-07-27 Robert Dewar <dewar@adacore.com> * gnatfind.adb, osint.ads, sem.adb, xr_tabls.adb: Minor reformatting and code clean up. From-SVN: r150117
This commit is contained in:
parent
df7c3f6275
commit
d33744e42a
@ -1,3 +1,8 @@
|
||||
2009-07-27 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* gnatfind.adb, osint.ads, sem.adb, xr_tabls.adb: Minor reformatting
|
||||
and code clean up.
|
||||
|
||||
2009-07-27 Ed Schonberg <schonberg@adacore.com>
|
||||
|
||||
* exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not attempt expansion in
|
||||
|
@ -157,14 +157,13 @@ procedure Gnatfind is
|
||||
|
||||
-- Only switch starting with -- recognized is --RTS
|
||||
|
||||
when '-' =>
|
||||
|
||||
when '-' =>
|
||||
if GNAT.Command_Line.Full_Switch = "-RTS" then
|
||||
|
||||
-- Check that it is the first time we see this switch
|
||||
|
||||
if RTS_Specified = null then
|
||||
RTS_Specified := new String'(GNAT.Command_Line.Parameter);
|
||||
|
||||
elsif RTS_Specified.all /= GNAT.Command_Line.Parameter then
|
||||
Osint.Fail ("--RTS cannot be specified multiple times");
|
||||
end if;
|
||||
@ -204,18 +203,21 @@ procedure Gnatfind is
|
||||
"adalib directory");
|
||||
end if;
|
||||
end;
|
||||
|
||||
-- Process -ext switch
|
||||
|
||||
elsif GNAT.Command_Line.Full_Switch = "-ext" then
|
||||
|
||||
-- Check that it is the first time we see this switch
|
||||
|
||||
if EXT_Specified = null then
|
||||
EXT_Specified := new String'(GNAT.Command_Line.Parameter);
|
||||
|
||||
elsif EXT_Specified.all /= GNAT.Command_Line.Parameter then
|
||||
Osint.Fail ("--ext cannot be specified multiple times");
|
||||
end if;
|
||||
|
||||
if EXT_Specified'Length
|
||||
= Osint.ALI_Default_Suffix'Length
|
||||
if
|
||||
EXT_Specified'Length = Osint.ALI_Default_Suffix'Length
|
||||
then
|
||||
Osint.ALI_Suffix := EXT_Specified.all'Access;
|
||||
else
|
||||
|
@ -572,8 +572,8 @@ package Osint is
|
||||
-- Get length of argument
|
||||
|
||||
ALI_Default_Suffix : constant String_Ptr := new String'("ali");
|
||||
ALI_Suffix : String_Ptr := ALI_Default_Suffix;
|
||||
-- The suffix used for the library files (also known as ALI files)
|
||||
ALI_Suffix : String_Ptr := ALI_Default_Suffix;
|
||||
-- The suffixes used for the library files (also known as ALI files)
|
||||
|
||||
private
|
||||
|
||||
|
@ -1873,13 +1873,12 @@ package body Sem is
|
||||
Main_CU : constant Node_Id := Cunit (Main_Unit);
|
||||
|
||||
begin
|
||||
|
||||
-- If the main unit is an instantiation, the body appears
|
||||
-- before the instance spec, which is added later to the
|
||||
-- unit list. Do the spec if present, body will follow.
|
||||
-- If the main unit is an instantiation, the body appears before
|
||||
-- the instance spec, which is added later to the unit list. Do
|
||||
-- the spec if present, body will follow.
|
||||
|
||||
if Nkind (Original_Node (Unit (Main_CU)))
|
||||
in N_Generic_Instantiation
|
||||
in N_Generic_Instantiation
|
||||
and then Present (Library_Unit (Main_CU))
|
||||
then
|
||||
Do_Unit_And_Dependents
|
||||
@ -1965,9 +1964,11 @@ package body Sem is
|
||||
end loop;
|
||||
|
||||
-- See if it belongs to current unit, and if so, include its
|
||||
-- with_clauses.
|
||||
-- with_clauses. Do not process main unit prematurely.
|
||||
|
||||
if Pnode = CU then
|
||||
if Pnode = CU
|
||||
and then (CU /= Cunit (Main_Unit))
|
||||
then
|
||||
Walk_Immediate (Cunit (S), Include_Limited);
|
||||
end if;
|
||||
end;
|
||||
|
@ -824,14 +824,14 @@ package body Xr_Tabls is
|
||||
end if;
|
||||
|
||||
if File.Dir = null then
|
||||
if Ada.Strings.Fixed.Tail (File.File.all, 3)
|
||||
= Osint.ALI_Suffix.all
|
||||
if Ada.Strings.Fixed.Tail (File.File.all, 3) =
|
||||
Osint.ALI_Suffix.all
|
||||
then
|
||||
Tmp := Locate_Regular_File
|
||||
(Internal_Strip (File.File.all), Directories.Obj_Dir);
|
||||
(Internal_Strip (File.File.all), Directories.Obj_Dir);
|
||||
else
|
||||
Tmp := Locate_Regular_File
|
||||
(File.File.all, Directories.Src_Dir);
|
||||
(File.File.all, Directories.Src_Dir);
|
||||
end if;
|
||||
|
||||
if Tmp = null then
|
||||
|
Loading…
Reference in New Issue
Block a user