aboutsummaryrefslogtreecommitdiffstats
path: root/src/ghdldrv
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-12-23 21:00:42 +0100
committerTristan Gingold <tgingold@free.fr>2018-12-23 21:00:42 +0100
commit317b196ae4552f23e31accd6e10a11e2903f9b31 (patch)
tree15451958243f0a1ae4102a593374b3998c7dcc27 /src/ghdldrv
parentfeb198c93bd936b20d5b3d878080ec4cdf7e480b (diff)
downloadghdl-317b196ae4552f23e31accd6e10a11e2903f9b31.tar.gz
ghdl-317b196ae4552f23e31accd6e10a11e2903f9b31.tar.bz2
ghdl-317b196ae4552f23e31accd6e10a11e2903f9b31.zip
parse/sem: be more tolerant of parse errors.
Diffstat (limited to 'src/ghdldrv')
-rw-r--r--src/ghdldrv/ghdlcomp.adb7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ghdldrv/ghdlcomp.adb b/src/ghdldrv/ghdlcomp.adb
index 0a1b7bac1..1a6aea6d6 100644
--- a/src/ghdldrv/ghdlcomp.adb
+++ b/src/ghdldrv/ghdlcomp.adb
@@ -449,7 +449,12 @@ package body Ghdlcomp is
raise Compilation_Error;
end if;
- Free_Iir (Design_File);
+ if New_Design_File = Design_File then
+ pragma Assert (Flags.Flag_Force_Analysis);
+ null;
+ else
+ Free_Iir (Design_File);
+ end if;
-- Do late analysis checks.
if New_Design_File /= Null_Iir then