diff options
Diffstat (limited to 'gcc/ada/switch.adb')
-rw-r--r-- | gcc/ada/switch.adb | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/ada/switch.adb b/gcc/ada/switch.adb index cb5c4d11f49..e2987060858 100644 --- a/gcc/ada/switch.adb +++ b/gcc/ada/switch.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -138,6 +138,23 @@ package body Switch is and then Switch_Chars (Ptr + 2 .. Ptr + 4) = "RTS")); end Is_Front_End_Switch; + ------------------------- + -- Is_Language_Switch -- + ------------------------- + + function Is_Language_Switch (Switch_Chars : String) return Boolean is + Ptr : constant Positive := Switch_Chars'First; + begin + return Is_Switch (Switch_Chars) + and then + (Switch_Chars (Ptr + 1 .. Switch_Chars'Last) = "gnat83" + or else Switch_Chars (Ptr + 1 .. Switch_Chars'Last) = "gnat95" + or else Switch_Chars (Ptr + 1 .. Switch_Chars'Last) = "gnat05" + or else Switch_Chars (Ptr + 1 .. Switch_Chars'Last) = "gnat2005" + or else Switch_Chars (Ptr + 1 .. Switch_Chars'Last) = "gnat12" + or else Switch_Chars (Ptr + 1 .. Switch_Chars'Last) = "gnat2012"); + end Is_Language_Switch; + ---------------------------- -- Is_Internal_GCC_Switch -- ---------------------------- |