summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libraries.adb13
-rw-r--r--src/vhdl/simulate/annotations.adb3
2 files changed, 6 insertions, 10 deletions
diff --git a/src/libraries.adb b/src/libraries.adb
index 6b9850b..9852c52 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
diff --git a/src/vhdl/simulate/annotations.adb b/src/vhdl/simulate/annotations.adb
index 93d731b..bdd9ad8 100644
--- a/src/vhdl/simulate/annotations.adb
+++ b/src/vhdl/simulate/annotations.adb
@@ -1008,7 +1008,8 @@ package body Annotations is
(Arch_Info, Get_Concurrent_Statement_Chain (Decl));
end Annotate_Architecture;
- procedure Annotate_Package (Decl: Iir_Package_Declaration) is
+ procedure Annotate_Package (Decl: Iir_Package_Declaration)
+ is
Package_Info: Sim_Info_Acc;
begin
Assert_No_Info (Decl);