From d4a1785b2f6ed8998088b4a1d674801336cd4cb5 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 18 Jan 2018 20:47:44 +0100 Subject: errorout: remove use of Nam_Buffer. --- src/vhdl/errorout.adb | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/vhdl/errorout.adb b/src/vhdl/errorout.adb index 26b588280..a230e8dc3 100644 --- a/src/vhdl/errorout.adb +++ b/src/vhdl/errorout.adb @@ -940,15 +940,9 @@ package body Errorout is when Iir_Kind_Procedure_Call => return "procedure call"; when Iir_Kind_Selected_Name => - Name_Table.Image (Get_Identifier (Node)); - return ''' - & Name_Table.Nam_Buffer (1 .. Name_Table.Nam_Length) - & '''; + return ''' & Name_Table.Image (Get_Identifier (Node)) & '''; when Iir_Kind_Simple_Name => - Name_Table.Image (Get_Identifier (Node)); - return ''' - & Name_Table.Nam_Buffer (1 .. Name_Table.Nam_Length) - & '''; + return ''' & Name_Table.Image (Get_Identifier (Node)) & '''; when Iir_Kind_Reference_Name => -- Shouldn't happen. return "name"; @@ -1410,8 +1404,7 @@ package body Errorout is return; end if; end if; - Image (Get_Identifier (Decl)); - Append (Res, Nam_Buffer (1 .. Nam_Length)); + Append (Res, Image (Get_Identifier (Decl))); end Append_Type; begin @@ -1433,17 +1426,16 @@ package body Errorout is Id : constant Name_Id := Get_Identifier (Subprg); begin - Image (Id); case Id is when Std_Names.Name_Id_Operators | Std_Names.Name_Word_Operators | Std_Names.Name_Xnor | Std_Names.Name_Shift_Operators => Append (Res, """"); - Append (Res, Nam_Buffer (1 .. Nam_Length)); + Append (Res, Image (Id)); Append (Res, """"); when others => - Append (Res, Nam_Buffer (1 .. Nam_Length)); + Append (Res, Image (Id)); end case; end; -- cgit v1.2.3