aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-07-15 18:40:04 +0200
committerTristan Gingold <tgingold@free.fr>2019-07-15 18:40:04 +0200
commitf6fde5424ad9585ef61149403cd695b465addd8b (patch)
tree0213c5588d6ebf99a589bb544fbd807025ac22be
parent4b35c49030a2c4844539be20af3430fe709e9b8e (diff)
downloadghdl-f6fde5424ad9585ef61149403cd695b465addd8b.tar.gz
ghdl-f6fde5424ad9585ef61149403cd695b465addd8b.tar.bz2
ghdl-f6fde5424ad9585ef61149403cd695b465addd8b.zip
ghdlsynth: quit early in case of error.
-rw-r--r--src/ghdldrv/ghdlsynth.adb11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ghdldrv/ghdlsynth.adb b/src/ghdldrv/ghdlsynth.adb
index 429d1ab55..861a9eb66 100644
--- a/src/ghdldrv/ghdlsynth.adb
+++ b/src/ghdldrv/ghdlsynth.adb
@@ -139,6 +139,10 @@ package body Ghdlsynth is
end if;
Errorout.Report_Msg (Msgid_Note, Option, No_Source_Coord,
"top entity is %i", (1 => +Top));
+ if Nbr_Errors > 0 then
+ -- No need to configure if there are missing units.
+ return No_Module;
+ end if;
Prim_Id := Get_Identifier (Top);
Sec_Id := Null_Identifier;
else
@@ -152,6 +156,11 @@ package body Ghdlsynth is
Config := Vhdl.Configuration.Configure (Prim_Id, Sec_Id);
+ if Nbr_Errors > 0 then
+ -- No need to configure if there are missing units.
+ return No_Module;
+ end if;
+
-- Check (and possibly abandon) if entity can be at the top of the
-- hierarchy.
declare
@@ -162,7 +171,7 @@ package body Ghdlsynth is
begin
Vhdl.Configuration.Check_Entity_Declaration_Top (Entity, False);
if Nbr_Errors > 0 then
- raise Compilation_Error;
+ return No_Module;
end if;
end;