diff options
author | Tristan Gingold | 2015-01-12 05:03:42 +0100 |
---|---|---|
committer | Tristan Gingold | 2015-01-12 05:03:42 +0100 |
commit | 4d24c422cc4a3f84bf0aa81fa26e777355b7265c (patch) | |
tree | 0f2e2a5fced7f615184e5eeb6aff9badcb489ed7 /src/vhdl/sem_names.adb | |
parent | bf34db9bc6351e0a89c2faa208ac12add92363ec (diff) | |
download | ghdl-4d24c422cc4a3f84bf0aa81fa26e777355b7265c.tar.gz ghdl-4d24c422cc4a3f84bf0aa81fa26e777355b7265c.tar.bz2 ghdl-4d24c422cc4a3f84bf0aa81fa26e777355b7265c.zip |
vhdl2008: expanded names in for-generate statements.
Diffstat (limited to 'src/vhdl/sem_names.adb')
-rw-r--r-- | src/vhdl/sem_names.adb | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb index 7edad15..756066c 100644 --- a/src/vhdl/sem_names.adb +++ b/src/vhdl/sem_names.adb @@ -311,10 +311,8 @@ package body Sem_Names is procedure Iterator_Decl_Chain is new Sem_Scopes.Iterator_Decl_Chain (Arg_Type => Name_Id, Handle_Decl => Iterator_Decl); - Id : Name_Id; - Decl_Body : Iir; + Id : constant Name_Id := Get_Identifier (Name); begin - Id := Get_Identifier (Name); case Get_Kind (Decl) is when Iir_Kind_Function_Declaration | Iir_Kind_Procedure_Declaration => @@ -352,11 +350,14 @@ package body Sem_Names is case Get_Kind (Decl) is when Iir_Kind_Function_Declaration | Iir_Kind_Procedure_Declaration => - Decl_Body := Get_Subprogram_Body (Decl); - Iterator_Decl_Chain - (Get_Declaration_Chain (Decl_Body), Id); - Iterator_Decl_Chain - (Get_Sequential_Statement_Chain (Decl_Body), Id); + declare + Decl_Body : constant Iir := Get_Subprogram_Body (Decl); + begin + Iterator_Decl_Chain + (Get_Declaration_Chain (Decl_Body), Id); + Iterator_Decl_Chain + (Get_Sequential_Statement_Chain (Decl_Body), Id); + end; when Iir_Kind_Architecture_Body | Iir_Kind_Entity_Declaration | Iir_Kind_Block_Statement => @@ -364,7 +365,7 @@ package body Sem_Names is Iterator_Decl_Chain (Get_Concurrent_Statement_Chain (Decl), Id); when Iir_Kind_For_Generate_Statement => declare - Bod : constant Iir := Get_Generate_Block_Configuration (Decl); + Bod : constant Iir := Get_Generate_Statement_Body (Decl); begin Iterator_Decl_Chain (Get_Declaration_Chain (Bod), Id); Iterator_Decl_Chain (Get_Concurrent_Statement_Chain (Bod), Id); |