aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/translate/ortho_front.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-07-14 06:49:54 +0200
committerTristan Gingold <tgingold@free.fr>2019-07-14 08:31:58 +0200
commite837a3899bb7d2bd8dc4d99ae0cb10ae0d4a1a75 (patch)
treebd5dd68785a1b3d252cd480646f3fc2733359fdf /src/vhdl/translate/ortho_front.adb
parentf0868dcab83c303091a1082d1417a7db64448ee6 (diff)
downloadghdl-e837a3899bb7d2bd8dc4d99ae0cb10ae0d4a1a75.tar.gz
ghdl-e837a3899bb7d2bd8dc4d99ae0cb10ae0d4a1a75.tar.bz2
ghdl-e837a3899bb7d2bd8dc4d99ae0cb10ae0d4a1a75.zip
vhdl: refactoring: remove configure function with string access.
Diffstat (limited to 'src/vhdl/translate/ortho_front.adb')
-rw-r--r--src/vhdl/translate/ortho_front.adb24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/vhdl/translate/ortho_front.adb b/src/vhdl/translate/ortho_front.adb
index 935d5c9d0..77d5c73a3 100644
--- a/src/vhdl/translate/ortho_front.adb
+++ b/src/vhdl/translate/ortho_front.adb
@@ -61,9 +61,9 @@ package body Ortho_Front is
Action : Action_Type := Action_Compile;
-- Name of the entity to elaborate.
- Elab_Entity : String_Acc;
+ Elab_Entity : Name_Id;
-- Name of the architecture to elaborate.
- Elab_Architecture : String_Acc;
+ Elab_Architecture : Name_Id;
-- Filename for the list of files to link.
Elab_Filelist : String_Acc;
@@ -89,15 +89,15 @@ package body Ortho_Front is
Options.Initialize;
Elab_Filelist := null;
- Elab_Entity := null;
- Elab_Architecture := null;
+ Elab_Entity := Null_Identifier;
+ Elab_Architecture := Null_Identifier;
Flag_Expect_Failure := False;
end Init;
function Decode_Elab_Option (Arg : String_Acc; Cmd : String)
return Natural is
begin
- Elab_Architecture := null;
+ Elab_Architecture := Null_Identifier;
-- Entity (+ architecture) to elaborate
if Arg = null then
Error_Msg_Option
@@ -146,12 +146,14 @@ package body Ortho_Front is
P := P - 1;
end if;
end loop;
- Elab_Architecture := new String'(Arg (P + 1 .. Arg'Last - 1));
- Elab_Entity := new String'(Arg (Arg'First .. P - 1));
+ Elab_Architecture :=
+ Name_Table.Get_Identifier (Arg (P + 1 .. Arg'Last - 1));
+ Elab_Entity :=
+ Name_Table.Get_Identifier (Arg (Arg'First .. P - 1));
end;
else
- Elab_Entity := new String'(Arg.all);
- Elab_Architecture := new String'("");
+ Elab_Entity := Name_Table.Get_Identifier (Arg.all);
+ Elab_Architecture := Null_Identifier;
end if;
return 2;
end Decode_Elab_Option;
@@ -552,7 +554,7 @@ package body Ortho_Front is
Shlib_Interning.Init;
Config := Vhdl.Configuration.Configure
- (Elab_Entity.all, Elab_Architecture.all);
+ (Elab_Entity, Elab_Architecture);
if Errorout.Nbr_Errors > 0 then
-- This may happen (bad entity for example).
raise Compilation_Error;
@@ -606,7 +608,7 @@ package body Ortho_Front is
Flags.Flag_Elaborate := True;
Flags.Flag_Only_Elab_Warnings := False;
Config := Vhdl.Configuration.Configure
- (Elab_Entity.all, Elab_Architecture.all);
+ (Elab_Entity, Elab_Architecture);
Translation.Elaborate (Config, True);
if Errorout.Nbr_Errors > 0 then