[cfe-dev] How to handle -f flags

Eli Friedman eli.friedman at gmail.com
Fri Sep 27 13:55:55 PDT 2013


On Fri, Sep 27, 2013 at 1:19 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> >> * Add both to Options.td:
> >>
> >> def fshow_column : Flag<["-"], "fshow-column">, Group<f_Group>,
> >> Flags<[CC1Option]>;
> >> def fno_show_column : Flag<["-"], "fno-show-column">, Group<f_Group>,
> >> Flags<[CC1Option]>,
> >>   HelpText<"Do not include column number on diagnostics">;
> >>
> >> * Add it to some .def file.
> >>
> >> DIAGOPT(ShowColumn, 1, 1)       /// Show column number on diagnostics.
> >
> >
> > I don't think this part of it is really an issue... this plus the bit of
> > code in lib/Frontend is sort of boilerplate, but I don't think it's worth
> > increasing the scope of the patch to cover it.  I would lean towards
> keeping
> > the options in the driver.
>
> I agree that .td is currently the weakest link and I would try to fix
> that first. My inclination was to pass all -f options to -cc1 since it
> will have to parse them anyway, but I could also check them in the
> driver just to make sure all options are valid and not even run -cc1
> if they are not.
>
> What advantage do you see in parsing the -f options in the driver?
>
>
> Oh, you mean as opposed to -cc1?  Err, ignore that bit. :)

-Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130927/448677b9/attachment.html>


More information about the cfe-dev mailing list