dexonsmith added a comment.
I have an idea: use `DEFAULT_VALUE` to keep current behaviour. Here's an
example to demonstrate.
`cl_mad_enable` is implied by `OPT_cl_unsafe_math_optimizations` or
`OPT_cl_fast_relaxed_math`. Instead of setting the default value to `"false"`
it could be set to `"CodeGenOpts.CLUnsafeMath || LangOpts.FastRelaxedMath"`
(one hitch is that `CLUnsafeMath` doesn't currently exist).
You'd need to update the `OPTION_WITH_MARSHALLING_FLAG` definition in
`parseSimpleArgs` to something like:
#define OPTION_WITH_MARSHALLING_FLAG(PREFIX_TYPE, NAME, ID, KIND, GROUP,
\
ALIAS, ALIASARGS, FLAGS, PARAM,
HELPTEXT, \
METAVAR, VALUES, SPELLING, ALWAYS_EMIT,
\
KEYPATH, DEFAULT_VALUE, IS_POSITIVE)
\
this->KEYPATH = (Args.hasArg(OPT_##ID) && IS_POSITIVE) || (DEFAULT_VALUE);
@Bigcheese / @jansvoboda11 , WDYT?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82756/new/
https://reviews.llvm.org/D82756
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits