From ad4ac5499e426cff9b76479e8ff6250a32fcbb57 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 1 Mar 2015 18:09:30 +0100 Subject: Elaborate generics in two steps. Fix -c/-e for llvm builds. --- src/ortho/llvm/ortho_code_main.adb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/ortho') diff --git a/src/ortho/llvm/ortho_code_main.adb b/src/ortho/llvm/ortho_code_main.adb index f80979fc7..8d7ba8289 100644 --- a/src/ortho/llvm/ortho_code_main.adb +++ b/src/ortho/llvm/ortho_code_main.adb @@ -169,11 +169,17 @@ begin Opt_Arg : String_Acc; Res : Natural; begin + Opt_Arg := null; if Optind < Argument_Count then - Opt_Arg := new String'(Argument (Optind + 1)); - else - Opt_Arg := null; + declare + Arg1 : constant String := Argument (Optind + 1); + begin + if Arg1 (Arg1'First) /= '-' then + Opt_Arg := new String'(Arg1); + end if; + end; end if; + Res := Ortho_Front.Decode_Option (Opt, Opt_Arg); case Res is when 0 => -- cgit v1.2.3