This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [pph] Prepare for mutation detection [2/3] (issue5142049)


More comments to come on [3/3], for now just a single comment below on
this specific patch:

> diff --git a/gcc/cp/pph-streamer-in.c b/gcc/cp/pph-streamer-in.c
> index 0bd4d64..b267833 100644
> --- a/gcc/cp/pph-streamer-in.c
> +++ b/gcc/cp/pph-streamer-in.c
> @@ -439,7 +439,10 @@ pph_in_cxx_binding_1 (pph_stream *stream)
> Â if (marker == PPH_RECORD_END)
> Â Â return NULL;
> Â else if (pph_is_reference_marker (marker))
> - Â Âreturn (cxx_binding *) pph_cache_get (&stream->cache, image_ix, ix, marker);
> + Â Â{
> + Â Â Âpph_cache *cache = pph_cache_select (stream, marker, image_ix);
> + Â Â Âreturn (cxx_binding *) pph_cache_get (cache, ix);
> + Â Â}

Seems like you replaced the pph_cache_get one liners with these
two-liners. Wouldn't a simple inline function be nicer for this?

Gab


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]