diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-10-24 19:16:25 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-10-24 19:16:25 +0200 |
commit | e1e1c38602ce8a080427ea189c46fc74873ab453 (patch) | |
tree | c4014f19121712c56d6a6a6017ffd881f7a10b2c /src | |
parent | 7e5107e960144176a27ca370564e1d2f0ba23c5f (diff) | |
download | ghdl-e1e1c38602ce8a080427ea189c46fc74873ab453.tar.gz ghdl-e1e1c38602ce8a080427ea189c46fc74873ab453.tar.bz2 ghdl-e1e1c38602ce8a080427ea189c46fc74873ab453.zip |
libraries.adb: constant-ify.
Diffstat (limited to 'src')
-rw-r--r-- | src/libraries.adb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libraries.adb b/src/libraries.adb index ef140db8d..966bec0bf 100644 --- a/src/libraries.adb +++ b/src/libraries.adb @@ -1912,13 +1912,12 @@ package body Libraries is function Find_Secondary_Unit (Primary: Iir_Design_Unit; Name: Name_Id) return Iir_Design_Unit is + Lib_Prim : constant Iir := Get_Library (Get_Design_File (Primary)); + Primary_Ident : constant Name_Id := + Get_Identifier (Get_Library_Unit (Primary)); Design_Unit: Iir_Design_Unit; Library_Unit: Iir; - Primary_Ident: Name_Id; - Lib_Prim : Iir; begin - Lib_Prim := Get_Library (Get_Design_File (Primary)); - Primary_Ident := Get_Identifier (Get_Library_Unit (Primary)); Design_Unit := Unit_Hash_Table (Primary_Ident mod Unit_Hash_Length); while Design_Unit /= Null_Iir loop Library_Unit := Get_Library_Unit (Design_Unit); @@ -1958,7 +1957,7 @@ package body Libraries is -- Load an secondary unit and analyse it. function Load_Secondary_Unit (Primary: Iir_Design_Unit; Name: Name_Id; Loc : Iir) - return Iir_Design_Unit + return Iir_Design_Unit is Design_Unit: Iir_Design_Unit; begin |