diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-09-18 15:04:33 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-09-18 15:04:33 +0200 |
commit | 62652e356f2e91d2317f5305a03f972385ba7ca1 (patch) | |
tree | 57cd13d4c1ccaaa78f29d2b304e0090a35d06d29 /src/vhdl/iirs_utils.adb | |
parent | 6284c9c6baf057a4421b1163328621c707349080 (diff) | |
download | ghdl-62652e356f2e91d2317f5305a03f972385ba7ca1.tar.gz ghdl-62652e356f2e91d2317f5305a03f972385ba7ca1.tar.bz2 ghdl-62652e356f2e91d2317f5305a03f972385ba7ca1.zip |
vhdl08: preliminary work for package body instantiation.
Diffstat (limited to 'src/vhdl/iirs_utils.adb')
-rw-r--r-- | src/vhdl/iirs_utils.adb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/vhdl/iirs_utils.adb b/src/vhdl/iirs_utils.adb index 5a87de0b7..ac6a2dd06 100644 --- a/src/vhdl/iirs_utils.adb +++ b/src/vhdl/iirs_utils.adb @@ -390,6 +390,28 @@ package body Iirs_Utils is end loop; end Get_Association_Interface; + function Get_Association_Interface (Assoc : Iir; Inter : Iir) return Iir is + begin + if Get_Formal (Assoc) /= Null_Iir then + return Get_Association_Interface (Assoc); + else + return Inter; + end if; + end Get_Association_Interface; + + procedure Next_Association_Interface + (Assoc : in out Iir; Inter : in out Iir) is + begin + if Get_Formal (Assoc) /= Null_Iir then + -- Association by name. Next one will also be associated by name + -- so no need to track interface. + Inter := Null_Iir; + else + Inter := Get_Chain (Inter); + end if; + Assoc := Get_Chain (Assoc); + end Next_Association_Interface; + function Find_Name_In_List (List: Iir_List; Lit: Name_Id) return Iir is El: Iir; Ident: Name_Id; |