From: David Malcolm Date: Tue, 22 Dec 2015 22:06:00 +0000 (+0000) Subject: libcpp: Avoid unnecessary ad-hoc uses for large source files X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=329590d70441f5300eafa7340845a65359b1c46b;p=gcc.git 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 --- diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 9b296fd836a..09b8e1825e9 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,10 @@ +2015-12-22 David Malcolm + + * 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 * include/line-map.h (rich_location::set_range): Add line_maps * diff --git a/libcpp/line-map.c b/libcpp/line-map.c index 209d0fbe656..c20a32b5f0f 100644 --- a/libcpp/line-map.c +++ b/libcpp/line-map.c @@ -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). */ - if (locus < RESERVED_LOCATION_COUNT - && locus == src_range.m_start + if (locus == src_range.m_start && locus == src_range.m_finish && !data) return locus;