Commit 2e501722 authored by jhugues's avatar jhugues
Browse files

* Do not halt instantiation in case of incomplete features,

          useful for Cheddar, MAST or REAL backends

git-svn-id: 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 99a9cc50
......@@ -268,8 +268,6 @@ package body Ocarina.Instances.Components.Features is
if Present (New_Subinstance) then
Set_Corresponding_Instance (New_Instance, New_Subinstance);
Success := False;
end if;
end if;
......@@ -312,6 +310,7 @@ package body Ocarina.Instances.Components.Features is
-- Abort the instantiation of the corresponding entity if there
-- is no such corresponding entity.
Display_Instantiation_Error (Feature, Fatal => False);
return No_Node;
C := ATE.Get_Referenced_Entity (Entity_Ref (Feature));
......@@ -73,13 +73,19 @@ package body Ocarina.Instances.Messages is
-- Display_Instantiation_Error --
procedure Display_Instantiation_Error (Node : Node_Id) is
procedure Display_Instantiation_Error
(Node : Node_Id; Fatal : Boolean := True)
pragma Assert (Present (Node));
Error_Loc (1) := Loc (Node);
Error_Name (1) := Get_Name_Of_Entity (Node);
DE ("%cannot be properly instantiated");
Exit_On_Error (True, "Cannot instantiate full model, exit now");
if Fatal then
DE ("%cannot be properly instantiated");
DW ("%cannot be properly instantiated");
end if;
Exit_On_Error (Fatal, "Cannot instantiate full model, exit now");
end Display_Instantiation_Error;
end Ocarina.Instances.Messages;
......@@ -35,6 +35,7 @@ package Ocarina.Instances.Messages is
procedure Display_No_Entity_Ref (Node : Node_Id);
procedure Display_Entity_Is_A_Component_Type (Node : Node_Id);
procedure Display_Instantiation_Error (Node : Node_Id);
procedure Display_Instantiation_Error
(Node : Node_Id; Fatal : Boolean := True);
end Ocarina.Instances.Messages;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment