[PATCH] A couple of line map fixes

https://gcc.gnu.org/ml/gcc-patches/2018-10/msg00623.html
	* include/line-map.h (LINEMAPS_MACRO_LOWEST_LOCATION): Fix
	off-by-one error.
	* line-map.c (linemap_enter_macro): Use RAII.  Clear all of the
	macro_locations.

From-SVN: r265037
This commit is contained in:
Nathan Sidwell 2018-10-11 12:42:37 +00:00 committed by Nathan Sidwell
parent c7790bdbd9
commit c1b48b2929
3 changed files with 15 additions and 14 deletions

View file

@ -1017,7 +1017,7 @@ LINEMAPS_MACRO_LOWEST_LOCATION (const line_maps *set)
{
return LINEMAPS_MACRO_USED (set)
? MAP_START_LOCATION (LINEMAPS_LAST_MACRO_MAP (set))
: MAX_SOURCE_LOCATION;
: MAX_SOURCE_LOCATION + 1;
}
/* Returns the last macro map allocated in the line table SET. */