aboutsummaryrefslogtreecommitdiffstats
path: root/src/libraries.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-01-18 12:18:02 +0100
committerTristan Gingold <tgingold@free.fr>2015-01-18 12:18:02 +0100
commit2f28dbc09fd009e5003f59c9f3aa511a834f1518 (patch)
tree5a3c9ecfb4c58922e1a2f80fc71316bff42017d4 /src/libraries.adb
parentc6139c6025e41101a87ed0e4ae5ddd40edf15a9e (diff)
downloadghdl-2f28dbc09fd009e5003f59c9f3aa511a834f1518.tar.gz
ghdl-2f28dbc09fd009e5003f59c9f3aa511a834f1518.tar.bz2
ghdl-2f28dbc09fd009e5003f59c9f3aa511a834f1518.zip
Style fixes.
Diffstat (limited to 'src/libraries.adb')
-rw-r--r--src/libraries.adb13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/libraries.adb b/src/libraries.adb
index 6b9850bae..9852c5261 100644
--- a/src/libraries.adb
+++ b/src/libraries.adb
@@ -261,8 +261,7 @@ package body Libraries is
-- DATE is the symbolic date of analysis (order).
--
-- Return TRUE if the library was found.
- function Load_Library (Library: Iir_Library_Declaration)
- return Boolean
+ function Load_Library (Library: Iir_Library_Declaration) return Boolean
is
use Scanner;
use Tokens;
@@ -308,7 +307,7 @@ package body Libraries is
end String_To_Name_Id;
Design_Unit, Last_Design_Unit : Iir_Design_Unit;
- Lib_Ident : Name_Id;
+ Lib_Ident : constant Name_Id := Get_Identifier (Library);
function Scan_Unit_List return Iir_List is
begin
@@ -341,17 +340,13 @@ package body Libraries is
Max_Date: Date_Type := Date_Valid'First;
Dir : Name_Id;
begin
- Lib_Ident := Get_Identifier (Library);
+ -- Check the library was not already loaded.
+ pragma Assert (Get_Design_File_Chain (Library) = Null_Iir);
if False then
Ada.Text_IO.Put_Line ("Load library " & Image (Lib_Ident));
end if;
- -- Check the library was not already loaded.
- if Get_Design_File_Chain (Library) /= Null_Iir then
- raise Internal_Error;
- end if;
-
-- Try to open the library file map.
Dir := Get_Library_Directory (Library);
if Dir = Null_Identifier then