diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-11-29 18:59:55 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-11-29 18:59:55 +0100 |
commit | 787b286207964eb4880ed868f39814732d891482 (patch) | |
tree | 020b00432ab8a10c2d26a6daf9209d48800ba8ad /src | |
parent | 62a1c5fc6ec1a2ff00ef639affb6907f020d44eb (diff) | |
download | ghdl-787b286207964eb4880ed868f39814732d891482.tar.gz ghdl-787b286207964eb4880ed868f39814732d891482.tar.bz2 ghdl-787b286207964eb4880ed868f39814732d891482.zip |
files_map: add assertions.
Diffstat (limited to 'src')
-rw-r--r-- | src/files_map.adb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/files_map.adb b/src/files_map.adb index abbd0c48c..e9d0a2e9e 100644 --- a/src/files_map.adb +++ b/src/files_map.adb @@ -216,6 +216,10 @@ package body Files_Map is loop << Again >> null; + pragma Assert (Hi >= Low); + pragma Assert (Low >= 1); + pragma Assert (Hi <= Last (Source_File.Lines)); + Mid := (Hi + Low) / 2; if Lines_Table (Mid) = Source_Ptr_Bad then -- There is a hole: no position for this line. |