aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-12-18 18:15:56 +0100
committerTristan Gingold <tgingold@free.fr>2018-12-18 18:19:30 +0100
commitffd93ac7df2bd7e9d89bdfe9c9df0fa7de7e241c (patch)
treecfe19becfaf8fee4fdf57fe681eb024e5f49a4a8 /src/vhdl
parent19e41f3f328209bf1c0fa615af442b4c62305b37 (diff)
downloadghdl-ffd93ac7df2bd7e9d89bdfe9c9df0fa7de7e241c.tar.gz
ghdl-ffd93ac7df2bd7e9d89bdfe9c9df0fa7de7e241c.tar.bz2
ghdl-ffd93ac7df2bd7e9d89bdfe9c9df0fa7de7e241c.zip
std_package: make std_location public.
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/std_package.adb7
-rw-r--r--src/vhdl/std_package.ads6
2 files changed, 9 insertions, 4 deletions
diff --git a/src/vhdl/std_package.adb b/src/vhdl/std_package.adb
index ee6b8cdac..8bc6b0011 100644
--- a/src/vhdl/std_package.adb
+++ b/src/vhdl/std_package.adb
@@ -15,7 +15,7 @@
-- along with GHDL; see the file COPYING. If not, write to the Free
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
-with Types; use Types;
+
with Files_Map;
with Name_Table;
with Str_Table;
@@ -32,7 +32,6 @@ package body Std_Package is
High_Bound : constant Bound_Array := (False => (2 ** 31) - 1,
True => (2 ** 63) - 1);
- Std_Location: Location_Type := Location_Nil;
Std_Filename : Name_Id := Null_Identifier;
-- Could be public.
@@ -82,8 +81,8 @@ package body Std_Package is
end Create_Known_Iir;
begin
Std_Filename := Name_Table.Get_Identifier ("*std_standard*");
- Std_Location := Files_Map.File_To_Location
- (Files_Map.Create_Virtual_Source_File (Std_Filename));
+ Std_Source_File := Files_Map.Create_Virtual_Source_File (Std_Filename);
+ Std_Location := Files_Map.File_To_Location (Std_Source_File);
if Create_Iir_Error /= Error_Mark then
raise Internal_Error;
diff --git a/src/vhdl/std_package.ads b/src/vhdl/std_package.ads
index 1c714b95c..f8830ae2e 100644
--- a/src/vhdl/std_package.ads
+++ b/src/vhdl/std_package.ads
@@ -15,6 +15,8 @@
-- along with GHDL; see the file COPYING. If not, write to the Free
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
+
+with Types; use Types;
with Iirs; use Iirs;
package Std_Package is
@@ -24,6 +26,10 @@ package Std_Package is
-- Its kind is Iir_Kind_Error.
Error_Mark : constant Iir;
+ -- Virtual file and location for the standard package.
+ Std_Source_File : Source_File_Entry := No_Source_File_Entry;
+ Std_Location: Location_Type := Location_Nil;
+
-- Some well know values declared in the STANDARD package.
-- These values (except time_base) *must* not be modified, and are set by
-- create_std_standard_package.