aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/errorout.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-05-09 22:01:45 +0200
committerTristan Gingold <tgingold@free.fr>2015-05-09 22:01:45 +0200
commit69bbb91b44a1677fd1a0e5accce91f756b06727a (patch)
treeb363e3110c984841c09f8d17bc901f0dda8f25f6 /src/vhdl/errorout.adb
parent2ef5d28d91f0ec650f2c1fdd10581847375b2bae (diff)
downloadghdl-69bbb91b44a1677fd1a0e5accce91f756b06727a.tar.gz
ghdl-69bbb91b44a1677fd1a0e5accce91f756b06727a.tar.bz2
ghdl-69bbb91b44a1677fd1a0e5accce91f756b06727a.zip
Rename Get_Location_Str to Image.
Diffstat (limited to 'src/vhdl/errorout.adb')
-rw-r--r--src/vhdl/errorout.adb34
1 files changed, 1 insertions, 33 deletions
diff --git a/src/vhdl/errorout.adb b/src/vhdl/errorout.adb
index 877fea25d..a36412009 100644
--- a/src/vhdl/errorout.adb
+++ b/src/vhdl/errorout.adb
@@ -832,41 +832,9 @@ package body Errorout is
-- Disp a node location.
-- Used for output of message.
- function Get_Location_Str
- (Name : Name_Id; Line, Col : Natural; Filename : Boolean)
- return String
- is
- Line_Str : constant String := Natural'Image (Line);
- Col_Str : constant String := Natural'Image (Col);
- begin
- if Filename then
- return Name_Table.Image (Name)
- & ':' & Line_Str (Line_Str'First + 1 .. Line_Str'Last)
- & ':' & Col_Str (Col_Str'First + 1 .. Col_Str'Last);
- else
- return Line_Str (Line_Str'First + 1 .. Line_Str'Last)
- & ':' & Col_Str (Col_Str'First + 1 .. Col_Str'Last);
- end if;
- end Get_Location_Str;
-
- function Get_Location_Str (Loc : Location_Type; Filename : Boolean := True)
- return string
- is
- Line, Col : Natural;
- Name : Name_Id;
- begin
- if Loc = Location_Nil then
- -- Avoid a crash.
- return "??:??:??";
- else
- Location_To_Position (Loc, Name, Line, Col);
- return Get_Location_Str (Name, Line, Col, Filename);
- end if;
- end Get_Location_Str;
-
function Disp_Location (Node: Iir) return String is
begin
- return Get_Location_Str (Get_Location (Node));
+ return Image (Get_Location (Node));
end Disp_Location;
function Disp_Name (Kind : Iir_Kind) return String is