Mercurial > hg > CbC > CbC_gcc
comparison gcc/ada/back_end.adb @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
4 -- -- | 4 -- -- |
5 -- B A C K _ E N D -- | 5 -- B A C K _ E N D -- |
6 -- -- | 6 -- -- |
7 -- B o d y -- | 7 -- B o d y -- |
8 -- -- | 8 -- -- |
9 -- Copyright (C) 1992-2018, Free Software Foundation, Inc. -- | 9 -- Copyright (C) 1992-2019, Free Software Foundation, Inc. -- |
10 -- -- | 10 -- -- |
11 -- GNAT is free software; you can redistribute it and/or modify it under -- | 11 -- GNAT is free software; you can redistribute it and/or modify it under -- |
12 -- terms of the GNU General Public License as published by the Free Soft- -- | 12 -- terms of the GNU General Public License as published by the Free Soft- -- |
13 -- ware Foundation; either version 3, or (at your option) any later ver- -- | 13 -- ware Foundation; either version 3, or (at your option) any later ver- -- |
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- | 14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- |
235 procedure Scan_Back_End_Switches (Switch_Chars : String) is | 235 procedure Scan_Back_End_Switches (Switch_Chars : String) is |
236 First : constant Positive := Switch_Chars'First + 1; | 236 First : constant Positive := Switch_Chars'First + 1; |
237 Last : constant Natural := Switch_Last (Switch_Chars); | 237 Last : constant Natural := Switch_Last (Switch_Chars); |
238 | 238 |
239 begin | 239 begin |
240 -- Skip -o or internal GCC switches together with their argument. | 240 -- Skip -o or internal GCC switches together with their argument |
241 | 241 |
242 if Switch_Chars (First .. Last) = "o" | 242 if Switch_Chars (First .. Last) = "o" |
243 or else Is_Internal_GCC_Switch (Switch_Chars) | 243 or else Is_Internal_GCC_Switch (Switch_Chars) |
244 then | 244 then |
245 Next_Arg := Next_Arg + 1; | 245 Next_Arg := Next_Arg + 1; |
246 | 246 |
247 -- Store -G xxx as -Gxxx and go directly to the next argument. | 247 -- Store -G xxx as -Gxxx and go directly to the next argument |
248 | 248 |
249 elsif Switch_Chars (First .. Last) = "G" then | 249 elsif Switch_Chars (First .. Last) = "G" then |
250 Next_Arg := Next_Arg + 1; | 250 Next_Arg := Next_Arg + 1; |
251 | 251 |
252 -- Should never get there with -G not followed by an argument, | 252 -- Should never get there with -G not followed by an argument, |
253 -- but use defensive code nonetheless. | 253 -- but use defensive code nonetheless. Store as -Gxxx to avoid |
254 -- Store as -Gxxx to avoid storing parameters in ALI files that | 254 -- storing parameters in ALI files that might create confusion. |
255 -- might create confusion. | |
256 | 255 |
257 if Next_Arg <= Args'Last then | 256 if Next_Arg <= Args'Last then |
258 Store_Compilation_Switch (Switch_Chars & Args (Next_Arg).all); | 257 Store_Compilation_Switch (Switch_Chars & Args (Next_Arg).all); |
259 end if; | 258 end if; |
260 | 259 |