Thank you for your review, Richard.

On 05/30/2017 01:59 PM, Richard Biener wrote:
I think the issue is unfortunate in the C frontend as well.  So I believe we can
go without a new langhook and instead make sure dwarf2out_early_global_decl
is not called for uninteresting decls (which means eventually pushing the
call(s) of that hook more towards the FEs).

It is called by rest_of_decl_compilation, which seems itself to be called a lot on FUNCTION_DECL nodes. Before I dive into this consequent change: this would lead for instance to add a parameter to rest_of_compilation to control whether it must call the early_global_decl hook, and then to update all callers accordingly. Is this what you actually have in mind?

For C/C++ it would be reasonable to output debug info for external declarations
that end up being used for example.

I guess that could be done indeed. :-)

--
Pierre-Marie de Rodat

Reply via email to