summaryrefslogtreecommitdiff
path: root/gcc/opts.h
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-11-12 11:07:37 +0100
committerMartin Liska <marxin@gcc.gnu.org>2019-11-12 10:07:37 +0000
commit76c26af90ea3af7487e701e451a4591a81727e8a (patch)
treef06db17114922ff30c4c817dbb00a5852f3b043e /gcc/opts.h
parent62aee289e4791fd68aace01accf433fb26b3eeae (diff)
Param to options conversion.
2019-11-12 Martin Liska <mliska@suse.cz> * common.opt: Remove --param and --param= options. * opt-functions.awk: Mark CL_PARAMS for options that have Param keyword. * opts-common.c (decode_cmdline_options_to_array): Replace --param key=value with --param=key=value. * opts.c (print_filtered_help): Remove special printing of params. (print_specific_help): Update title for params. (common_handle_option): Do not handle OPT__param. opts.h (SET_OPTION_IF_UNSET): New macro. * doc/options.texi: Document Param keyword. From-SVN: r278083
Diffstat (limited to 'gcc/opts.h')
-rw-r--r--gcc/opts.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/opts.h b/gcc/opts.h
index 47223229388..0de8e4269db 100644
--- a/gcc/opts.h
+++ b/gcc/opts.h
@@ -461,4 +461,14 @@ extern bool parse_and_check_align_values (const char *flag,
bool report_error,
location_t loc);
+/* Set OPTION in OPTS to VALUE if the option is not set in OPTS_SET. */
+
+#define SET_OPTION_IF_UNSET(OPTS, OPTS_SET, OPTION, VALUE) \
+ do \
+ { \
+ if (!(OPTS_SET)->x_ ## OPTION) \
+ (OPTS)->x_ ## OPTION = VALUE; \
+ } \
+ while (false)
+
#endif