[Ada] Merge duplicated processing for gnatmake -u and -U switches
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 14 Oct 2020 21:43:21 +0000 (23:43 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 25 Nov 2020 13:22:43 +0000 (08:22 -0500)
gcc/ada/

* make.adb (Scan_Make_Arg): Merge ELSIF branches for -u and -U.

gcc/ada/make.adb

index 0034d1a..1288875 100644 (file)
@@ -4697,19 +4697,9 @@ package body Make is
             pragma Assert (Argv'Last = 2);
             Minimal_Recompilation := True;
 
-         --  -u
+         --  -u and -U (they are differentiated elsewhere)
 
-         elsif Argv (2) = 'u' and then Argv'Last = 2 then
-            Unique_Compile := True;
-            Compile_Only   := True;
-            Do_Bind_Step   := False;
-            Do_Link_Step   := False;
-
-         --  -U
-
-         elsif Argv (2) = 'U'
-           and then Argv'Last = 2
-         then
+         elsif Argv (2) in 'u' | 'U' and then Argv'Last = 2 then
             Unique_Compile := True;
             Compile_Only   := True;
             Do_Bind_Step   := False;