Commit 329590d7 by David Malcolm Committed by David Malcolm

libcpp: Avoid unnecessary ad-hoc uses for large source files

libcpp/ChangeLog:
	* line-map.c (get_combined_adhoc_loc): Remove condition
	on locus < RESERVED_LOCATION_COUNT when considering
	whether a caret == start == finish location can be
	simply stored as the caret location.

From-SVN: r231918
parent 9edb6bb8
2015-12-22 David Malcolm <dmalcolm@redhat.com>
* line-map.c (get_combined_adhoc_loc): Remove condition
on locus < RESERVED_LOCATION_COUNT when considering
whether a caret == start == finish location can be
simply stored as the caret location.
2015-12-07 David Malcolm <dmalcolm@redhat.com> 2015-12-07 David Malcolm <dmalcolm@redhat.com>
* include/line-map.h (rich_location::set_range): Add line_maps * * include/line-map.h (rich_location::set_range): Add line_maps *
......
...@@ -196,10 +196,9 @@ get_combined_adhoc_loc (struct line_maps *set, ...@@ -196,10 +196,9 @@ get_combined_adhoc_loc (struct line_maps *set,
} }
} }
/* We can also compactly store the reserved locations /* We can also compactly store locations
when locus == start == finish (and data is NULL). */ when locus == start == finish (and data is NULL). */
if (locus < RESERVED_LOCATION_COUNT if (locus == src_range.m_start
&& locus == src_range.m_start
&& locus == src_range.m_finish && locus == src_range.m_finish
&& !data) && !data)
return locus; return locus;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment