aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/netlists-errors.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-05-09 15:50:27 +0200
committerTristan Gingold <tgingold@free.fr>2020-05-09 16:31:20 +0200
commit23c923649a05e35bf57da3b290ea2136e761f565 (patch)
treea19e194269866ad28e0d1be440ab635e486f3023 /src/synth/netlists-errors.adb
parentc9d2cccb38b985783108f187398a0a0af9f6ab62 (diff)
downloadghdl-23c923649a05e35bf57da3b290ea2136e761f565.tar.gz
ghdl-23c923649a05e35bf57da3b290ea2136e761f565.tar.bz2
ghdl-23c923649a05e35bf57da3b290ea2136e761f565.zip
synth: correctly quote nets name in error messages.
Diffstat (limited to 'src/synth/netlists-errors.adb')
-rw-r--r--src/synth/netlists-errors.adb13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/synth/netlists-errors.adb b/src/synth/netlists-errors.adb
index b67af38d1..86f703ca7 100644
--- a/src/synth/netlists-errors.adb
+++ b/src/synth/netlists-errors.adb
@@ -61,6 +61,13 @@ package body Netlists.Errors is
end case;
end Output_Name_1;
+ procedure Output_Name (N : Sname) is
+ begin
+ Output_Message ("""");
+ Output_Name_1 (N);
+ Output_Message ("""");
+ end Output_Name;
+
procedure Synth_Instance_Handler
(Format : Character; Err : Error_Record; Val : Uns32)
is
@@ -69,7 +76,7 @@ package body Netlists.Errors is
begin
case Format is
when 'n' =>
- Output_Name_1 (Get_Instance_Name (Inst));
+ Output_Name (Get_Instance_Name (Inst));
when 'i' =>
Output_Message ("i");
Output_Uns32 (Uns32 (Inst));
@@ -96,7 +103,7 @@ package body Netlists.Errors is
else
Name := Get_Output_Desc (Get_Module (Inst), Idx).Name;
end if;
- Output_Name_1 (Name);
+ Output_Name (Name);
end;
when others =>
raise Internal_Error;
@@ -110,7 +117,7 @@ package body Netlists.Errors is
N : constant Sname := Sname (Val);
begin
if Format = 'n' then
- Output_Name_1 (N);
+ Output_Name (N);
else
raise Internal_Error;
end if;