aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-streamer-in.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2019-10-15 12:03:04 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2019-10-15 12:03:04 +0000
commit9158f0ba97ff987948cd5ce8391a546751c6dff3 (patch)
tree23993f28ac6545c0a27d83cecfcfe29a6cd27608 /gcc/tree-streamer-in.c
parentd8955dc0f4583317c4d6a65d17c92c538f46a60c (diff)
downloadgcc-9158f0ba97ff987948cd5ce8391a546751c6dff3.zip
gcc-9158f0ba97ff987948cd5ce8391a546751c6dff3.tar.gz
gcc-9158f0ba97ff987948cd5ce8391a546751c6dff3.tar.bz2
[linemap PATCH] Constify lookup
https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01080.html looking up a line map takes a non-constant line_maps object, which is confusing. This makes the caching fields mutable, so permits a constant object, as one might expect for a lookup. * include/line-map.h (struct maps_info_ordinary): Make cache mutable. (struct maps_info_macro): Likewise. (LINEMAPS_CACHE): Remove non-ref accessor. Constify ref accessor. (LINEMAPS_ORDINARY_CACHE, LINEMAPS_MACRO_CACHE): Likewise. (LINEMAPS_ORDINARY_MAP_AT, LINEMAPS_MACRO_MAP_AT): Use LINEMAPS_USED and LINEMAPS_MAP_AT. (linemap_lookup): Constify line_map arg. linemap.c (linemap_ordinary_map_lookup, linemap_macro_map_lookup): Constify line_map arg. From-SVN: r276994
Diffstat (limited to 'gcc/tree-streamer-in.c')
0 files changed, 0 insertions, 0 deletions