nruslan added inline comments.
Comment at: lib/Driver/ToolChains/Clang.cpp:4038
+ if (Args.hasArg(options::OPT_mno_stack_arg_probe))
> I think you can just do
> Args.AddLastArg(CmdArgs, options::OPT_mno_stack_arg_probe)
> which avoids the if-statement and having to spell out the flag.
I added mstack_arg_probe also, and this check now contains two options. I am
not sure how AddLastArg behaves in this case (especially because only one
attribute needs to be defined: mno-stack-arg-probe, and a positive case is the
default). I found some other examples similar to this one, and they used hasArg
with two options.
cfe-commits mailing list