On Wed, Apr 29, 2020 at 10:25:38AM -0400, David Malcolm wrote:
> > I'd prefer not to at this point, all that could be commonized are
> > the two inform calls perhaps with a bool or enum arg which one it is,
> > but usually the backends prefer to keep their -Wpsabi stuff visible
> > there.
> > Yes, it affects 4 targets (s390 too; haven't touched that one,
> > because
> > there is a pending patch with two alternatives).
> 
> One other benefit is to move the allocation/free of the URL string so
> that it's guarded by the same condition as the "inform" call.
> 
> Is there a chance this patch could be doing a bunch of extra allocation
> and freeing of URL strings that never get used?  How often does this
> code get called?

I think it will be called infrequently, and emitting a diagnostic is already
slow.  E.g. the URLs for warnings are also allocated and freed during the
warning{,_at} call.  So, not sure it is worth wasting a static variable on
it, especially for all the other 52 or how many backends that don't need it.

But if you feel strongly about it, can do it that way, though not really
sure what is the best spot to place it, calls.[ch] ?

        Jakub

Reply via email to