aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/nodes_meta.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-05-13 06:56:24 +0200
committerTristan Gingold <tgingold@free.fr>2015-05-13 06:56:24 +0200
commit6e168c5503339772dab0768e93a301318d705bcf (patch)
tree43e33c2fc03aeb0c61ffe7f520d3a50d74b7ed8a /src/vhdl/nodes_meta.adb
parent961d55b955d0a1526ebb7a5ddca8acee50b8ab1a (diff)
downloadghdl-6e168c5503339772dab0768e93a301318d705bcf.tar.gz
ghdl-6e168c5503339772dab0768e93a301318d705bcf.tar.bz2
ghdl-6e168c5503339772dab0768e93a301318d705bcf.zip
Change library format: now store file checksum instead of file time stamp.
For ticket 48.
Diffstat (limited to 'src/vhdl/nodes_meta.adb')
-rw-r--r--src/vhdl/nodes_meta.adb42
1 files changed, 31 insertions, 11 deletions
diff --git a/src/vhdl/nodes_meta.adb b/src/vhdl/nodes_meta.adb
index 13422cbc9..514ed57d5 100644
--- a/src/vhdl/nodes_meta.adb
+++ b/src/vhdl/nodes_meta.adb
@@ -22,7 +22,7 @@ package body Nodes_Meta is
Field_First_Design_Unit => Type_Iir,
Field_Last_Design_Unit => Type_Iir,
Field_Library_Declaration => Type_Iir,
- Field_File_Time_Stamp => Type_Time_Stamp_Id,
+ Field_File_Checksum => Type_File_Checksum_Id,
Field_Analysis_Time_Stamp => Type_Time_Stamp_Id,
Field_Library => Type_Iir,
Field_File_Dependence_List => Type_Iir_List,
@@ -327,8 +327,8 @@ package body Nodes_Meta is
return "last_design_unit";
when Field_Library_Declaration =>
return "library_declaration";
- when Field_File_Time_Stamp =>
- return "file_time_stamp";
+ when Field_File_Checksum =>
+ return "file_checksum";
when Field_Analysis_Time_Stamp =>
return "analysis_time_stamp";
when Field_Library =>
@@ -1407,7 +1407,7 @@ package body Nodes_Meta is
return Attr_Ref;
when Field_Library_Declaration =>
return Attr_Ref;
- when Field_File_Time_Stamp =>
+ when Field_File_Checksum =>
return Attr_None;
when Field_Analysis_Time_Stamp =>
return Attr_None;
@@ -2004,7 +2004,7 @@ package body Nodes_Meta is
Field_Design_File_Directory,
Field_Design_File_Filename,
Field_Analysis_Time_Stamp,
- Field_File_Time_Stamp,
+ Field_File_Checksum,
Field_Elab_Flag,
Field_File_Dependence_List,
Field_Chain,
@@ -4415,6 +4415,30 @@ package body Nodes_Meta is
end case;
end Set_Date_Type;
+ function Get_File_Checksum_Id
+ (N : Iir; F : Fields_Enum) return File_Checksum_Id is
+ begin
+ pragma Assert (Fields_Type (F) = Type_File_Checksum_Id);
+ case F is
+ when Field_File_Checksum =>
+ return Get_File_Checksum (N);
+ when others =>
+ raise Internal_Error;
+ end case;
+ end Get_File_Checksum_Id;
+
+ procedure Set_File_Checksum_Id
+ (N : Iir; F : Fields_Enum; V: File_Checksum_Id) is
+ begin
+ pragma Assert (Fields_Type (F) = Type_File_Checksum_Id);
+ case F is
+ when Field_File_Checksum =>
+ Set_File_Checksum (N, V);
+ when others =>
+ raise Internal_Error;
+ end case;
+ end Set_File_Checksum_Id;
+
function Get_Iir
(N : Iir; F : Fields_Enum) return Iir is
begin
@@ -5804,8 +5828,6 @@ package body Nodes_Meta is
begin
pragma Assert (Fields_Type (F) = Type_Time_Stamp_Id);
case F is
- when Field_File_Time_Stamp =>
- return Get_File_Time_Stamp (N);
when Field_Analysis_Time_Stamp =>
return Get_Analysis_Time_Stamp (N);
when others =>
@@ -5818,8 +5840,6 @@ package body Nodes_Meta is
begin
pragma Assert (Fields_Type (F) = Type_Time_Stamp_Id);
case F is
- when Field_File_Time_Stamp =>
- Set_File_Time_Stamp (N, V);
when Field_Analysis_Time_Stamp =>
Set_Analysis_Time_Stamp (N, V);
when others =>
@@ -5894,10 +5914,10 @@ package body Nodes_Meta is
return K = Iir_Kind_Library_Clause;
end Has_Library_Declaration;
- function Has_File_Time_Stamp (K : Iir_Kind) return Boolean is
+ function Has_File_Checksum (K : Iir_Kind) return Boolean is
begin
return K = Iir_Kind_Design_File;
- end Has_File_Time_Stamp;
+ end Has_File_Checksum;
function Has_Analysis_Time_Stamp (K : Iir_Kind) return Boolean is
begin