diff options
Diffstat (limited to 'src/ortho/llvm/ortho_code_main.adb')
-rw-r--r-- | src/ortho/llvm/ortho_code_main.adb | 12 |
1 files changed, 9 insertions, 3 deletions
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 => |