summaryrefslogtreecommitdiff
path: root/libcpp/line-map.c
diff options
context:
space:
mode:
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2015-12-22 22:06:00 +0000
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2015-12-22 22:06:00 +0000
commit7b4b11d3bd6a295a74062583f8fc0bf2d5161005 (patch)
tree7b51b5685ab6c1dc082095c957e45d186e8866aa /libcpp/line-map.c
parentfc7a3a00ad5089bd13f7e4646f7a319e7eee407c (diff)
downloadgcc-7b4b11d3bd6a295a74062583f8fc0bf2d5161005.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231918 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/line-map.c')
-rw-r--r--libcpp/line-map.c5
1 files changed, 2 insertions, 3 deletions
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;