On Jan 21 2020, Martin Liška wrote:

> diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
> index fe8f292f877..f2504cc5b4f 100644
> --- a/gcc/lto-wrapper.c
> +++ b/gcc/lto-wrapper.c
> @@ -1241,6 +1241,16 @@ jobserver_active_p (void)
>         && is_valid_fd (wfd));
>  }
>  
> +/* Prune invalid characters that can't be in name due to Makefile syntax.  */
> +
> +static void
> +prune_filename_for_make (char *filename)
> +{
> +  for (unsigned i = 0; i < strlen (filename); i++)

That's quadratic runtime.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

Reply via email to