On Thu, Aug 16, 2012 at 06:59:09PM +0200, Simon Baldwin wrote:
> On 16 August 2012 16:40, Michael Matz <[email protected]> wrote:
> >
> > ,,,
> >
> > Do you have considered to use a new option flag (usable in the .opt files)
> > instead of a langhook? I.e. add a flag cl_dont_record to cl_option, a
> > string Norecord for the .opt files, some handling for it in
> > opt-functions.awk and the like?
> >
> > Adding lang-hooks used by debug producers make me twitch :)
>
> Okay. Below is an alternative approach.
>
> I've moved discussion to gcc-patches, since it's now more concrete
> than abstract.
You could have just added
case OPT_cpp_:
to the switch in gen_producer_string, instead of all this.
> --- gcc/dwarf2out.c (revision 190442)
> +++ gcc/dwarf2out.c (working copy)
> @@ -18101,6 +18101,9 @@ gen_producer_string (void)
> /* Ignore these. */
> continue;
> default:
> + if (cl_options[save_decoded_options[j].opt_index].flags
> + & CL_NO_DWARF_RECORD)
> + continue;
> gcc_checking_assert (save_decoded_options[j].canonical_option[0][0]
> == '-');
> switch (save_decoded_options[j].canonical_option[0][1])
Jakub