From a1d8c53e1cba26c14f64d8951b2117dda1fa4d25 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 9 Oct 2019 20:23:41 +0200 Subject: synth: use synth.source for setting location. --- src/synth/synth-source.adb | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src/synth/synth-source.adb') 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; -- cgit v1.2.3