diff options
author | Tristan Gingold | 2014-12-15 06:42:10 +0100 |
---|---|---|
committer | Tristan Gingold | 2014-12-15 06:42:10 +0100 |
commit | 6d2b8c7bfcbd534406243093d1ec5e77ac4c8484 (patch) | |
tree | 082afe2c691eae5108d9781035bad22804b42585 /src/vhdl/translate/translation.adb | |
parent | cce31df3a7327c5e35fbfa818d87580219e73128 (diff) | |
download | ghdl-6d2b8c7bfcbd534406243093d1ec5e77ac4c8484.tar.gz ghdl-6d2b8c7bfcbd534406243093d1ec5e77ac4c8484.tar.bz2 ghdl-6d2b8c7bfcbd534406243093d1ec5e77ac4c8484.zip |
Use same node for implicit and explicit subprogram declarations.
Diffstat (limited to 'src/vhdl/translate/translation.adb')
-rw-r--r-- | src/vhdl/translate/translation.adb | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/vhdl/translate/translation.adb b/src/vhdl/translate/translation.adb index 977e01f..42ffbab 100644 --- a/src/vhdl/translate/translation.adb +++ b/src/vhdl/translate/translation.adb @@ -1810,15 +1810,17 @@ package body Translation is Decl := Get_Chain (Decl); Chap7.Init_Implicit_Subprogram_Infos (Infos); + + -- Implicit subprograms are immediately follow the type declaration. while Decl /= Null_Iir loop - case Get_Kind (Decl) is - when Iir_Kind_Implicit_Function_Declaration - | Iir_Kind_Implicit_Procedure_Declaration => - Chap7.Translate_Implicit_Subprogram (Decl, Infos); - Decl := Get_Chain (Decl); - when others => - exit; - end case; + if Get_Kind (Decl) in Iir_Kinds_Subprogram_Declaration + and then Is_Implicit_Subprogram (Decl) + then + Chap7.Translate_Implicit_Subprogram (Decl, Infos); + Decl := Get_Chain (Decl); + else + exit; + end if; end loop; end Translate_Type_Implicit_Subprograms; @@ -1902,7 +1904,7 @@ package body Translation is Decl := Get_Chain (Decl); when Iir_Kind_Attribute_Declaration => Decl := Get_Chain (Decl); - when Iir_Kind_Implicit_Function_Declaration => + when Iir_Kind_Function_Declaration => case Get_Implicit_Definition (Decl) is when Iir_Predefined_Now_Function => null; |