From 8d2bc284f030ab3ade000f11520dfbf9d8995c69 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 18 Oct 2017 05:42:47 +0200 Subject: Add extended locations (elocations). Still WIP --- src/ghdldrv/ghdlprint.adb | 4 +++- src/ghdldrv/ghdlxml.adb | 8 -------- 2 files changed, 3 insertions(+), 9 deletions(-) (limited to 'src/ghdldrv') diff --git a/src/ghdldrv/ghdlprint.adb b/src/ghdldrv/ghdlprint.adb index 97689082a..a19085527 100644 --- a/src/ghdldrv/ghdlprint.adb +++ b/src/ghdldrv/ghdlprint.adb @@ -36,6 +36,7 @@ with Xrefs; with Ghdlmain; use Ghdlmain; with Ghdllocal; use Ghdllocal; with Disp_Vhdl; +with Elocations; package body Ghdlprint is type Html_Format_Type is (Html_2, Html_Css); @@ -681,6 +682,7 @@ package body Ghdlprint is Len : Natural; begin Flags.Bootstrap := True; + Flags.Flag_Elocations := True; -- Load word library. Libraries.Load_Std_Library; Libraries.Load_Work_Library; @@ -763,7 +765,7 @@ package body Ghdlprint is Lib := Get_Library_Unit (Unit); Location_To_File_Pos - (Get_End_Location (Unit), File_Entry, Lend); + (Elocations.Get_End_Location (Lib), File_Entry, Lend); if Lend < First then raise Internal_Error; end if; diff --git a/src/ghdldrv/ghdlxml.adb b/src/ghdldrv/ghdlxml.adb index de2e383ba..5ce64b299 100644 --- a/src/ghdldrv/ghdlxml.adb +++ b/src/ghdldrv/ghdlxml.adb @@ -346,14 +346,6 @@ package body Ghdlxml is when Type_Iir_Direction => Put_Field (F, Image_Iir_Direction (Get_Iir_Direction (N, F))); - when Type_Location_Type => - declare - Loc : constant Location_Type := Get_Location_Type (N, F); - begin - if Loc /= No_Location then - Put_Field (F, Image_Location_Type (Loc)); - end if; - end; when Type_Iir_Int32 => Put_Field (F, Strip (Iir_Int32'Image (Get_Iir_Int32 (N, F)))); -- cgit v1.2.3