aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-03-01 18:09:30 +0100
committerTristan Gingold <tgingold@free.fr>2015-03-01 18:09:30 +0100
commitad4ac5499e426cff9b76479e8ff6250a32fcbb57 (patch)
treed24f1903700733dbb125ebea420d0980d84d8da9 /src/ortho
parent3619ff721b0456b2f15bd2d4913fd57aa97e827b (diff)
downloadghdl-ad4ac5499e426cff9b76479e8ff6250a32fcbb57.tar.gz
ghdl-ad4ac5499e426cff9b76479e8ff6250a32fcbb57.tar.bz2
ghdl-ad4ac5499e426cff9b76479e8ff6250a32fcbb57.zip
Elaborate generics in two steps. Fix -c/-e for llvm builds.
Diffstat (limited to 'src/ortho')
-rw-r--r--src/ortho/llvm/ortho_code_main.adb12
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 =>