From fbe43ad4dc8451fecba5318af97541283207a0e8 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 30 Dec 2020 16:21:31 +0100 Subject: src/edif: Rename Direction_Type to avoid hiding in types.ads --- src/edif/edif-nodes.adb | 16 ++++++++-------- src/edif/edif-nodes.adb.in | 8 ++++---- src/edif/edif-nodes.ads | 6 +++--- src/edif/edif-nodes_meta.adb | 18 +++++++++--------- src/edif/edif-nodes_meta.ads | 10 +++++----- 5 files changed, 29 insertions(+), 29 deletions(-) (limited to 'src') diff --git a/src/edif/edif-nodes.adb b/src/edif/edif-nodes.adb index 7cd00b9f2..1bf2429ef 100644 --- a/src/edif/edif-nodes.adb +++ b/src/edif/edif-nodes.adb @@ -134,10 +134,10 @@ package body Edif.Nodes is function Int32_To_Node is new Ada.Unchecked_Conversion (Source => Int32, Target => Node); - function Bit2_Type_To_Direction_Type is new Ada.Unchecked_Conversion - (Bit2_Type, Direction_Type); - function Direction_Type_To_Bit2_Type is new Ada.Unchecked_Conversion - (Direction_Type, Bit2_Type); + function Bit2_Type_To_Dir_Type is new Ada.Unchecked_Conversion + (Bit2_Type, Dir_Type); + function Dir_Type_To_Bit2_Type is new Ada.Unchecked_Conversion + (Dir_Type, Bit2_Type); function Node_To_Location_Type (N : Node) return Location_Type is @@ -865,20 +865,20 @@ package body Edif.Nodes is Set_Field4 (N, View); end Set_View; - function Get_Direction (N : Node) return Direction_Type is + function Get_Direction (N : Node) return Dir_Type is begin pragma Assert (N /= Null_Node); pragma Assert (Has_Direction (Get_Kind (N)), "no field Direction"); - return Bit2_Type_To_Direction_Type (Get_State1 (N)); + return Bit2_Type_To_Dir_Type (Get_State1 (N)); end Get_Direction; - procedure Set_Direction (N : Node; Dir : Direction_Type) is + procedure Set_Direction (N : Node; Dir : Dir_Type) is begin pragma Assert (N /= Null_Node); pragma Assert (Has_Direction (Get_Kind (N)), "no field Direction"); - Set_State1 (N, Direction_Type_To_Bit2_Type (Dir)); + Set_State1 (N, Dir_Type_To_Bit2_Type (Dir)); end Set_Direction; function Get_Boolean (N : Node) return Boolean is diff --git a/src/edif/edif-nodes.adb.in b/src/edif/edif-nodes.adb.in index 222d42d6f..d34cb76da 100644 --- a/src/edif/edif-nodes.adb.in +++ b/src/edif/edif-nodes.adb.in @@ -134,10 +134,10 @@ package body Edif.Nodes is function Int32_To_Node is new Ada.Unchecked_Conversion (Source => Int32, Target => Node); - function Bit2_Type_To_Direction_Type is new Ada.Unchecked_Conversion - (Bit2_Type, Direction_Type); - function Direction_Type_To_Bit2_Type is new Ada.Unchecked_Conversion - (Direction_Type, Bit2_Type); + function Bit2_Type_To_Dir_Type is new Ada.Unchecked_Conversion + (Bit2_Type, Dir_Type); + function Dir_Type_To_Bit2_Type is new Ada.Unchecked_Conversion + (Dir_Type, Bit2_Type); function Node_To_Location_Type (N : Node) return Location_Type is diff --git a/src/edif/edif-nodes.ads b/src/edif/edif-nodes.ads index 7dd61f2b1..f584ac8a5 100644 --- a/src/edif/edif-nodes.ads +++ b/src/edif/edif-nodes.ads @@ -61,7 +61,7 @@ package Edif.Nodes is Null_Node : constant Node := 0; - type Direction_Type is + type Dir_Type is ( Dir_Input, Dir_Output, @@ -394,8 +394,8 @@ package Edif.Nodes is procedure Set_View (N : Node; View : Node); -- Field: State1 (uc) - function Get_Direction (N : Node) return Direction_Type; - procedure Set_Direction (N : Node; Dir : Direction_Type); + function Get_Direction (N : Node) return Dir_Type; + procedure Set_Direction (N : Node; Dir : Dir_Type); -- Field: Flag1 function Get_Boolean (N : Node) return Boolean; diff --git a/src/edif/edif-nodes_meta.adb b/src/edif/edif-nodes_meta.adb index 2b3368d31..e480da8d7 100644 --- a/src/edif/edif-nodes_meta.adb +++ b/src/edif/edif-nodes_meta.adb @@ -50,7 +50,7 @@ package body Edif.Nodes_Meta is Field_Cell_Ref => Type_Node, Field_Library_Ref => Type_Node, Field_View => Type_Node, - Field_Direction => Type_Direction_Type, + Field_Direction => Type_Dir_Type, Field_Boolean => Type_Boolean, Field_Value => Type_Node, Field_Owner => Type_Node, @@ -481,29 +481,29 @@ package body Edif.Nodes_Meta is end case; end Set_Boolean; - function Get_Direction_Type - (N : Node; F : Fields_Enum) return Direction_Type is + function Get_Dir_Type + (N : Node; F : Fields_Enum) return Dir_Type is begin - pragma Assert (Fields_Type (F) = Type_Direction_Type); + pragma Assert (Fields_Type (F) = Type_Dir_Type); case F is when Field_Direction => return Get_Direction (N); when others => raise Internal_Error; end case; - end Get_Direction_Type; + end Get_Dir_Type; - procedure Set_Direction_Type - (N : Node; F : Fields_Enum; V: Direction_Type) is + procedure Set_Dir_Type + (N : Node; F : Fields_Enum; V: Dir_Type) is begin - pragma Assert (Fields_Type (F) = Type_Direction_Type); + pragma Assert (Fields_Type (F) = Type_Dir_Type); case F is when Field_Direction => Set_Direction (N, V); when others => raise Internal_Error; end case; - end Set_Direction_Type; + end Set_Dir_Type; function Get_Int32 (N : Node; F : Fields_Enum) return Int32 is diff --git a/src/edif/edif-nodes_meta.ads b/src/edif/edif-nodes_meta.ads index b2422b044..dec5c15e1 100644 --- a/src/edif/edif-nodes_meta.ads +++ b/src/edif/edif-nodes_meta.ads @@ -24,7 +24,7 @@ package Edif.Nodes_Meta is type Types_Enum is ( Type_Boolean, - Type_Direction_Type, + Type_Dir_Type, Type_Int32, Type_Name_Id, Type_Node, @@ -117,10 +117,10 @@ package Edif.Nodes_Meta is procedure Set_Boolean (N : Node; F : Fields_Enum; V: Boolean); - function Get_Direction_Type - (N : Node; F : Fields_Enum) return Direction_Type; - procedure Set_Direction_Type - (N : Node; F : Fields_Enum; V: Direction_Type); + function Get_Dir_Type + (N : Node; F : Fields_Enum) return Dir_Type; + procedure Set_Dir_Type + (N : Node; F : Fields_Enum; V: Dir_Type); function Get_Int32 (N : Node; F : Fields_Enum) return Int32; -- cgit v1.2.3