diff options
author | Tristan Gingold <tgingold@free.fr> | 2015-07-10 19:22:50 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2015-07-10 19:22:50 +0200 |
commit | 05a50dfc3123d4e7379885870febb8baeb52a446 (patch) | |
tree | dd7f16339e11e1cb2f68f070e7c28e1cdb2ef03d /src | |
parent | 162aa24665bafdaab7fe5729c5ed6146ab503aa5 (diff) | |
download | ghdl-05a50dfc3123d4e7379885870febb8baeb52a446.tar.gz ghdl-05a50dfc3123d4e7379885870febb8baeb52a446.tar.bz2 ghdl-05a50dfc3123d4e7379885870febb8baeb52a446.zip |
Avoid duplicate error message.
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/iirs_utils.ads | 2 | ||||
-rw-r--r-- | src/vhdl/sem_specs.adb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/vhdl/iirs_utils.ads b/src/vhdl/iirs_utils.ads index 96ac91dd4..cb4efe187 100644 --- a/src/vhdl/iirs_utils.ads +++ b/src/vhdl/iirs_utils.ads @@ -171,7 +171,7 @@ package Iirs_Utils is return Iir; -- Wrapper around Get_Entity_Name: return the entity declaration of the - -- entity name of DECL. + -- entity name of DECL, or Null_Iir in case of error. function Get_Entity (Decl : Iir) return Iir; -- Wrapper around get_Configuration_Name: return the configuration diff --git a/src/vhdl/sem_specs.adb b/src/vhdl/sem_specs.adb index de48c4fe5..718ee1787 100644 --- a/src/vhdl/sem_specs.adb +++ b/src/vhdl/sem_specs.adb @@ -1039,6 +1039,9 @@ package body Sem_Specs is Entity_Name := Sem_Denoting_Name (Get_Entity_Name (Aspect)); Set_Entity_Name (Aspect, Entity_Name); Entity := Get_Named_Entity (Entity_Name); + if Entity = Error_Mark then + return Null_Iir; + end if; if Get_Kind (Entity) /= Iir_Kind_Entity_Declaration then Error_Class_Match (Entity_Name, "entity"); return Null_Iir; |