aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/sem_names.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-01-21 08:20:57 +0100
committerTristan Gingold <tgingold@free.fr>2018-01-21 08:20:57 +0100
commitf48c076a60081aab16b432bc35da5664a80a2487 (patch)
tree5594a424d05608dc977dbb15acb64fada5ba1273 /src/vhdl/sem_names.adb
parent2c1fcdea4def5a009aa031dfb37326a9db3b22dd (diff)
downloadghdl-f48c076a60081aab16b432bc35da5664a80a2487.tar.gz
ghdl-f48c076a60081aab16b432bc35da5664a80a2487.tar.bz2
ghdl-f48c076a60081aab16b432bc35da5664a80a2487.zip
sem_names: improve support of external names.
Diffstat (limited to 'src/vhdl/sem_names.adb')
-rw-r--r--src/vhdl/sem_names.adb16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb
index dd2851899..6ec51ed3a 100644
--- a/src/vhdl/sem_names.adb
+++ b/src/vhdl/sem_names.adb
@@ -1736,6 +1736,9 @@ package body Sem_Names is
| Iir_Kind_Instance_Name_Attribute =>
Free_Iir (Name);
return Res;
+ when Iir_Kinds_External_Name =>
+ pragma Assert (Name = Res);
+ return Res;
when Iir_Kind_Psl_Expression =>
return Res;
when Iir_Kind_Psl_Declaration =>
@@ -3776,6 +3779,8 @@ package body Sem_Names is
Sem_Selected_By_All_Name (Name);
when Iir_Kind_Attribute_Name =>
Sem_Attribute_Name (Name);
+ when Iir_Kinds_External_Name =>
+ Sem_External_Name (Name);
when others =>
Error_Kind ("sem_name", Name);
end case;
@@ -4235,6 +4240,17 @@ package body Sem_Names is
end if;
Set_Type (Name, Atype);
+
+ -- LRM08 8.1 Names
+ -- A name is said to be a static name if and only if one of the
+ -- following condition holds:
+ -- - The name is an external name.
+ Set_Name_Staticness (Name, Globally);
+
+ Set_Expr_Staticness (Name, None);
+
+ -- Consider the node as analyzed.
+ Set_Named_Entity (Name, Name);
end Sem_External_Name;
function Sem_Terminal_Name (Name : Iir) return Iir