From d78182cc0ce05104e2f1cd40c97de974f075479f Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Tue, 13 Oct 2015 10:08:50 +0000 Subject: Support DEFPARAMENUM in params.def 2015-10-13 Tom de Vries * Makefile.in (PARAMS_H, PLUGIN_HEADERS): Add params-enum.h. * params-enum.h: New file. * opts.c (handle_param): Handle case that param arg is a string. * params-list.h: Handle DEFPARAMENUM5 in params.def. * params.c (find_param): New function, factored out of ... (set_param_value): ... here. (param_string_value_p): New function. * params.h (struct param_info): Add value_names field. (find_param, param_string_value_p): Declare. From-SVN: r228755 --- gcc/params.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/params.h') diff --git a/gcc/params.h b/gcc/params.h index 9f7618a..1090d00 100644 --- a/gcc/params.h +++ b/gcc/params.h @@ -55,6 +55,9 @@ struct param_info /* A short description of the option. */ const char *const help; + + /* The optional names corresponding to the values. */ + const char **value_names; }; /* An array containing the compiler parameters and their current @@ -85,6 +88,9 @@ enum compiler_param LAST_PARAM }; +extern bool find_param (const char *, enum compiler_param *); +extern bool param_string_value_p (enum compiler_param, const char *, int *); + /* The value of the parameter given by ENUM. Not an lvalue. */ #define PARAM_VALUE(ENUM) \ ((int) global_options.x_param_values[(int) ENUM]) -- cgit v1.1