aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-annotations.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-05-15 19:05:31 +0200
committerTristan Gingold <tgingold@free.fr>2020-05-15 19:05:31 +0200
commit659dc5995a93794ca27949667edf90cc9f04468b (patch)
tree9deae1681e8de862711c3ec6f9faee9842b6c783 /src/vhdl/vhdl-annotations.adb
parent1d5db1f18f4d6f61433f4b91961378df24e5949b (diff)
downloadghdl-659dc5995a93794ca27949667edf90cc9f04468b.tar.gz
ghdl-659dc5995a93794ca27949667edf90cc9f04468b.tar.bz2
ghdl-659dc5995a93794ca27949667edf90cc9f04468b.zip
vhdl-utils: factorize Get_File_Signature.
Diffstat (limited to 'src/vhdl/vhdl-annotations.adb')
-rw-r--r--src/vhdl/vhdl-annotations.adb66
1 files changed, 0 insertions, 66 deletions
diff --git a/src/vhdl/vhdl-annotations.adb b/src/vhdl/vhdl-annotations.adb
index 48ec93fc3..e215b934e 100644
--- a/src/vhdl/vhdl-annotations.adb
+++ b/src/vhdl/vhdl-annotations.adb
@@ -144,72 +144,6 @@ package body Vhdl.Annotations is
end if;
end Annotate_Anonymous_Type_Definition;
- function Get_File_Signature_Length (Def : Iir) return Natural is
- begin
- case Get_Kind (Def) is
- when Iir_Kinds_Scalar_Type_And_Subtype_Definition =>
- return 1;
- when Iir_Kind_Array_Type_Definition
- | Iir_Kind_Array_Subtype_Definition =>
- return 2
- + Get_File_Signature_Length (Get_Element_Subtype (Def));
- when Iir_Kind_Record_Type_Definition
- | Iir_Kind_Record_Subtype_Definition =>
- declare
- List : constant Iir_Flist :=
- Get_Elements_Declaration_List (Get_Base_Type (Def));
- El : Iir;
- Res : Natural;
- begin
- Res := 2;
- for I in Flist_First .. Flist_Last (List) loop
- El := Get_Nth_Element (List, I);
- Res := Res + Get_File_Signature_Length (Get_Type (El));
- end loop;
- return Res;
- end;
- when others =>
- Error_Kind ("get_file_signature_length", Def);
- end case;
- end Get_File_Signature_Length;
-
- procedure Get_File_Signature (Def : Iir;
- Res : in out String;
- Off : in out Natural)
- is
- Scalar_Map : constant array (Kind_Scalar_Types) of Character := "beeEIF";
- begin
- case Get_Kind (Def) is
- when Iir_Kinds_Scalar_Type_And_Subtype_Definition =>
- Res (Off) := Scalar_Map (Get_Info (Get_Base_Type (Def)).Kind);
- Off := Off + 1;
- when Iir_Kind_Array_Type_Definition
- | Iir_Kind_Array_Subtype_Definition =>
- Res (Off) := '[';
- Off := Off + 1;
- Get_File_Signature (Get_Element_Subtype (Def), Res, Off);
- Res (Off) := ']';
- Off := Off + 1;
- when Iir_Kind_Record_Type_Definition
- | Iir_Kind_Record_Subtype_Definition =>
- declare
- List : constant Iir_Flist :=
- Get_Elements_Declaration_List (Get_Base_Type (Def));
- El : Iir;
- begin
- Res (Off) := '<';
- Off := Off + 1;
- for I in Flist_First .. Flist_Last (List) loop
- El := Get_Nth_Element (List, I);
- Get_File_Signature (Get_Type (El), Res, Off);
- end loop;
- Res (Off) := '>';
- Off := Off + 1;
- end;
- when others =>
- Error_Kind ("get_file_signature", Def);
- end case;
- end Get_File_Signature;
procedure Annotate_Protected_Type_Declaration (Block_Info : Sim_Info_Acc;
Prot: Iir)