On Fri, 2020-03-20 at 17:03 +0100, Martin Liška wrote:
> On 3/19/20 10:26 PM, David Malcolm wrote:
> > On Thu, 2020-03-19 at 14:52 +0100, Martin Liška wrote:

[...]

> > 
> > > -int
> > > +void
> > >   gcc::dump_manager::
> > >   dump_switch_p (const char *arg)
> > >   {
> > > @@ -1896,8 +1897,22 @@ dump_switch_p (const char *arg)
> > >       for (i = 0; i < m_extra_dump_files_in_use; i++)
> > >         any |= dump_switch_p_1 (arg, &m_extra_dump_files[i],
> > > true);
> > >   
> > > -
> > > -  return any;
> > > +  if (!any)
> > > +    {
> > > +      char *s;
> > > +      auto_vec<const char *> candidates;
> > > +      for (size_t i = TDI_none + 1; i != TDI_end; i++)
> > > + candidates.safe_push (dump_files[i].swtch);
> > > +      for (size_t i = 0; i < m_extra_dump_files_in_use; i++)
> > > + candidates.safe_push (m_extra_dump_files[i].swtch);
> > 
> > If I'm reading this right, this covers the simplest cases, but
> > misses
> > various valid options.
> > 
> > You did indeed describe it as "basic hint support", so fair enough,
> > I
> > suppose.
> 
> Exactly. To be honest, the dump options are mainly for developers and
> I don't want to spend much time on it.
> 
> > What about the glob and "-all" variants?
> 
> Enhancement candidate.

Fair enough.

[...]


> I'm sending the basic version with change to find_closest_string.
> I hope even this version is an improvement.
> 
> Martin

Thanks.  Looks good to me for stage 1.

Dave

Reply via email to