aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/iirs_utils.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/iirs_utils.adb')
-rw-r--r--src/vhdl/iirs_utils.adb13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/vhdl/iirs_utils.adb b/src/vhdl/iirs_utils.adb
index c8be11e75..ab4c8831d 100644
--- a/src/vhdl/iirs_utils.adb
+++ b/src/vhdl/iirs_utils.adb
@@ -974,23 +974,16 @@ package body Iirs_Utils is
is
Res : Iir;
begin
+ pragma Assert (Get_Kind (Name) in Iir_Kinds_Denoting_Name);
+
Res := Create_Iir (Iir_Kind_Reference_Name);
Location_Copy (Res, Name);
Set_Referenced_Name (Res, Name);
+ Set_Is_Forward_Ref (Res, True);
Set_Named_Entity (Res, Get_Named_Entity (Name));
return Res;
end Build_Reference_Name;
- function Build_Reference_Decl (Decl : Iir; Loc : Iir) return Iir
- is
- Res : Iir;
- begin
- Res := Create_Iir (Iir_Kind_Reference_Name);
- Location_Copy (Res, Loc);
- Set_Named_Entity (Res, Decl);
- return Res;
- end Build_Reference_Decl;
-
function Strip_Reference_Name (N : Iir) return Iir is
begin
if Get_Kind (N) = Iir_Kind_Reference_Name then