aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-source.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-10-09 20:23:41 +0200
committerTristan Gingold <tgingold@free.fr>2019-10-09 20:23:41 +0200
commita1d8c53e1cba26c14f64d8951b2117dda1fa4d25 (patch)
tree3aba188cfe6641d35e2f7341d5bf2d112b07678c /src/synth/synth-source.adb
parent7bb502c9372456aec9593b043e1fcf96b2e2138a (diff)
downloadghdl-a1d8c53e1cba26c14f64d8951b2117dda1fa4d25.tar.gz
ghdl-a1d8c53e1cba26c14f64d8951b2117dda1fa4d25.tar.bz2
ghdl-a1d8c53e1cba26c14f64d8951b2117dda1fa4d25.zip
synth: use synth.source for setting location.
Diffstat (limited to 'src/synth/synth-source.adb')
-rw-r--r--src/synth/synth-source.adb21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/synth/synth-source.adb b/src/synth/synth-source.adb
index 0ccbf0d90..4f6230723 100644
--- a/src/synth/synth-source.adb
+++ b/src/synth/synth-source.adb
@@ -22,10 +22,29 @@ with Netlists; use Netlists;
with Netlists.Locations; use Netlists.Locations;
package body Synth.Source is
+ procedure Set_Location2 (N : Net; Loc : Node) is
+ begin
+ Set_Location (Get_Net_Parent (N), Get_Location (Loc));
+ end Set_Location2;
+
+ procedure Set_Location2 (Inst : Instance; Loc : Node) is
+ begin
+ Set_Location (Inst, Get_Location (Loc));
+ end Set_Location2;
+
procedure Set_Location (N : Net; Src : Syn_Src) is
begin
+ -- Short and compact code as it is inlined.
+ if Flag_Locations then
+ Set_Location2 (N, Src);
+ end if;
+ end Set_Location;
+
+ procedure Set_Location (Inst : Instance; Src : Syn_Src) is
+ begin
+ -- Short and compact code as it is inlined.
if Flag_Locations then
- Set_Location (Get_Net_Parent (N), Get_Location (Src));
+ Set_Location2 (Inst, Src);
end if;
end Set_Location;
end Synth.Source;