Skip to content

Commit 131d43f

Browse files
committed
Consistently use Switches.Save_Temps instead of the raw cmdline argument
1 parent 3d6f2df commit 131d43f

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

tools/gnatcov/instrument-clean_objdirs.adb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ with Ada.Directories; use Ada.Directories;
2020

2121
with GNATCOLL.Projects; use GNATCOLL.Projects;
2222

23-
with Command_Line; use Command_Line;
2423
with Instrument.Common; use Instrument.Common;
2524
with Project;
2625

@@ -63,7 +62,7 @@ begin
6362
-- through extended projects, as their object directories can interfere
6463
-- with the build of the extending project.
6564

66-
if not Args.Bool_Args (Opt_Save_Temps) then
65+
if not Save_Temps then
6766
Project.Iterate_Projects
6867
(Root_Project => Project.Project.Root_Project,
6968
Process => Clean_Subdir'Access,

tools/gnatcov/instrument-projects.adb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1478,7 +1478,7 @@ begin
14781478
end loop;
14791479
end;
14801480

1481-
if not Args.Bool_Args (Opt_Save_Temps) then
1481+
if not Save_Temps then
14821482
Ada.Directories.Delete_File (+IC.Sources_Of_Interest_Response_File);
14831483
Ada.Directories.Delete_File (+IC.Ada_Preprocessor_Data_File);
14841484
end if;

tools/gnatcov/project.adb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ with GNATCOLL.Traces;
3030
with GNATCOLL.Projects.Aux;
3131
with GNATCOLL.VFS; use GNATCOLL.VFS;
3232

33-
with Command_Line; use Command_Line;
3433
with GNATcov_RTS.Buffers; use GNATcov_RTS.Buffers;
3534
with Inputs; use Inputs;
3635
with Instrument; use Instrument;
@@ -1629,7 +1628,7 @@ package body Project is
16291628

16301629
procedure Finalize is
16311630
begin
1632-
if Prj_Tree /= null and then not Args.Bool_Args (Opt_Save_Temps) then
1631+
if Prj_Tree /= null and then not Save_Temps then
16331632
GNATCOLL.Projects.Aux.Delete_All_Temp_Files (Prj_Tree.Root_Project);
16341633
end if;
16351634
end Finalize;

0 commit comments

Comments
 (0)