aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-utils.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-04-05 08:56:13 +0200
committerTristan Gingold <tgingold@free.fr>2021-04-05 08:56:13 +0200
commita9f68a1d91f8ea2a74d8ad4c34f9c777746848a4 (patch)
tree8994a975e6ddd5c9ec7aea2e6ceaab2c44629e10 /src/vhdl/vhdl-utils.adb
parentb0e6f54aba3912da5ad84e90ebc53b08ba716733 (diff)
downloadghdl-a9f68a1d91f8ea2a74d8ad4c34f9c777746848a4.tar.gz
ghdl-a9f68a1d91f8ea2a74d8ad4c34f9c777746848a4.tar.bz2
ghdl-a9f68a1d91f8ea2a74d8ad4c34f9c777746848a4.zip
vhdl: add Iir_Kind_Foreign_Module
Diffstat (limited to 'src/vhdl/vhdl-utils.adb')
-rw-r--r--src/vhdl/vhdl-utils.adb8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-utils.adb b/src/vhdl/vhdl-utils.adb
index 35cf51ed8..70596c929 100644
--- a/src/vhdl/vhdl-utils.adb
+++ b/src/vhdl/vhdl-utils.adb
@@ -302,6 +302,7 @@ package body Vhdl.Utils is
| Iir_Kind_Use_Clause
| Iir_Kind_Context_Reference
| Iir_Kind_Library_Declaration
+ | Iir_Kind_Foreign_Module
| Iir_Kinds_Library_Unit
| Iir_Kind_Component_Declaration
| Iir_Kind_Function_Declaration
@@ -1841,6 +1842,13 @@ package body Vhdl.Utils is
return K = K1 or K = K2;
end Kind_In;
+ function Kind_In (N : Iir; K1, K2, K3 : Iir_Kind) return Boolean
+ is
+ K : constant Iir_Kind := Get_Kind (N);
+ begin
+ return K = K1 or K = K2 or K = K3;
+ end Kind_In;
+
procedure Set_Attribute_Parameter
(Attr : Iir; N : Parameter_Index; Param : Iir) is
begin