aboutsummaryrefslogtreecommitdiffstats
path: root/src/psl/psl-hash.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-04-26 20:06:46 +0200
committerTristan Gingold <tgingold@free.fr>2020-04-26 20:07:53 +0200
commit2bdc1cdc3afc8350fb5bb1ba7a438055704a6ed9 (patch)
tree69ce5d8df99977b0dcac613c7068d863d67a7fd3 /src/psl/psl-hash.adb
parentf73b474036e2b91370de0696a14c2faf0a106097 (diff)
downloadghdl-2bdc1cdc3afc8350fb5bb1ba7a438055704a6ed9.tar.gz
ghdl-2bdc1cdc3afc8350fb5bb1ba7a438055704a6ed9.tar.bz2
ghdl-2bdc1cdc3afc8350fb5bb1ba7a438055704a6ed9.zip
psl: keep locations.
Diffstat (limited to 'src/psl/psl-hash.adb')
-rw-r--r--src/psl/psl-hash.adb5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/psl/psl-hash.adb b/src/psl/psl-hash.adb
index 89394c97d..2e36602d9 100644
--- a/src/psl/psl-hash.adb
+++ b/src/psl/psl-hash.adb
@@ -45,7 +45,8 @@ package body PSL.Hash is
end loop;
end Init;
- function Get_PSL_Node (Hdl : Int32) return Node is
+ function Get_PSL_Node (Hdl : Int32; Loc : Location_Type) return Node
+ is
Idx : Index_Type := Index_Type (Hdl mod Int32 (Hash_Size));
N_Idx : Index_Type;
Res : Node;
@@ -55,6 +56,7 @@ package body PSL.Hash is
if Res = Null_Node then
Res := Create_Node (N_HDL_Bool);
Set_HDL_Node (Res, Hdl);
+ Set_Location (Res, Loc);
Cells.Table (Idx).Res := Res;
return Res;
end if;
@@ -71,6 +73,7 @@ package body PSL.Hash is
end loop;
Res := Create_Node (N_HDL_Bool);
Set_HDL_Node (Res, Hdl);
+ Set_Location (Res, Loc);
Cells.Append ((Res => Res, Next => No_Index));
Cells.Table (Idx).Next := Cells.Last;
return Res;