[cfe-dev] Understanding Options.td

David Blaikie via cfe-dev cfe-dev at lists.llvm.org
Tue Mar 5 13:14:21 PST 2019


Nah, the warnings are emitted whenever the option isn't queried dynamically
by the frontend, I believe. So it's implicit in the options usage - code
doesn't use it? Warnings get emitted.

Usually if I'm curious about this sort of thing I set breakpoints in the
diagnostnic printing infrastructure and run the program to see what
motivated it to trigger.

On Tue, Mar 5, 2019 at 1:01 PM David Greene <dag at cray.com> wrote:

>
> David Blaikie via cfe-dev <cfe-dev at lists.llvm.org> writes:
>
> > I haven't looked - but my first guess at an argument to seek
> > inspiration from, would be -fuse-ld. See how that's handled, how it
> > warns if the compiler isn't doing a link action, etc.
>
> I grepped around but didn't see anything obvious that tells clang to
> emit the warning for use in a non-linking context.  clang does emit the
> warning so I am puzzled about how that happens.
>
> The definition looks simple enough:
>
> def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, Group<f_Group>,
> Flags<[CoreOption]>;
>
> It must not have anything to do with the TableGen definition.
>
>                            -David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190305/b5d49b40/attachment.html>


More information about the cfe-dev mailing list