diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-11-04 08:05:19 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-11-05 06:38:19 +0100 |
commit | b106247a9843880bcfa3611444e20696f0fb35ae (patch) | |
tree | 614fb373a86c6ff16a7239478bb2b5780b6901d9 /src/vhdl/iirs_utils.adb | |
parent | 4c7c53b2fb53cd6ff03776b4ce47f6e9f30fd52f (diff) | |
download | ghdl-b106247a9843880bcfa3611444e20696f0fb35ae.tar.gz ghdl-b106247a9843880bcfa3611444e20696f0fb35ae.tar.bz2 ghdl-b106247a9843880bcfa3611444e20696f0fb35ae.zip |
ownership: check tree after sem and canon.
Diffstat (limited to 'src/vhdl/iirs_utils.adb')
-rw-r--r-- | src/vhdl/iirs_utils.adb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/vhdl/iirs_utils.adb b/src/vhdl/iirs_utils.adb index ee10ed704..5495e6057 100644 --- a/src/vhdl/iirs_utils.adb +++ b/src/vhdl/iirs_utils.adb @@ -865,6 +865,25 @@ package body Iirs_Utils is 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 + return Get_Named_Entity (N); + else + return N; + end if; + end Strip_Reference_Name; + function Has_Resolution_Function (Subtyp : Iir) return Iir is Ind : constant Iir := Get_Resolution_Indication (Subtyp); |