aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.h
diff options
context:
space:
mode:
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 4722322..0de8e42 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