diff options
Diffstat (limited to 'gcc/params.c')
-rw-r--r-- | gcc/params.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/params.c b/gcc/params.c index 3ae5ccd5cbe..7aa96e2c8f3 100644 --- a/gcc/params.c +++ b/gcc/params.c @@ -69,6 +69,8 @@ add_params (const param_info params[], size_t n) void global_init_params (void) { + gcc_assert (!params_finished); + add_params (lang_independent_params, LAST_PARAM); targetm_common.option_default_params (); } @@ -82,6 +84,18 @@ finish_params (void) params_finished = true; } +/* Reset all state within params.c so that we can rerun the compiler + within the same process. For use by toplev::finalize. */ + +void +params_c_finalize (void) +{ + XDELETEVEC (compiler_params); + compiler_params = NULL; + num_compiler_params = 0; + params_finished = false; +} + /* Set the value of the parameter given by NUM to VALUE in PARAMS and PARAMS_SET. If EXPLICIT_P, this is being set by the user; otherwise it is being set implicitly by the compiler. */ |