https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83193
--- Comment #17 from Martin Liška <marxin at gcc dot gnu.org> --- Author: marxin Date: Mon Sep 3 08:16:27 2018 New Revision: 264052 URL: https://gcc.gnu.org/viewcvs?rev=264052&root=gcc&view=rev Log: Come up with TARGET_GET_VALID_OPTION_VALUES option hook (PR driver/83193). 2018-09-03 Martin Liska <mli...@suse.cz> PR driver/83193 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES. * common/common-targhooks.c (default_get_valid_option_values): New function. * common/common-targhooks.h (default_get_valid_option_values): Likewise. * common/config/i386/i386-common.c: Move processor_target_table from i386.c. (ix86_get_valid_option_values): New function. (TARGET_GET_VALID_OPTION_VALUES): New macro. * config/i386/i386.c (struct ptt): Move to i386-common.c. (PTA_*): Move all defined masks into i386-common.c. (ix86_function_specific_restore): Use new processor_cost_table. * config/i386/i386.h (struct ptt): Moved from i386.c. (struct pta): Likewise. * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES. * doc/tm.texi.in: Likewise. * opt-suggestions.c (option_proposer::suggest_option): Pass prefix to build_option_suggestions. (option_proposer::get_completions): Likewise. (option_proposer::build_option_suggestions): Use the new target hook. * opts.c (struct option_help_tuple): New struct. (print_filtered_help): Use the new target hook. 2018-09-03 Martin Liska <mli...@suse.cz> PR driver/83193 * gcc.dg/completion-4.c: New test. Added: trunk/gcc/testsuite/gcc.dg/completion-4.c Modified: trunk/gcc/ChangeLog trunk/gcc/common/common-target.def trunk/gcc/common/common-targhooks.c trunk/gcc/common/common-targhooks.h trunk/gcc/common/config/i386/i386-common.c trunk/gcc/config/i386/i386.c trunk/gcc/config/i386/i386.h trunk/gcc/doc/tm.texi trunk/gcc/doc/tm.texi.in trunk/gcc/opt-suggestions.c trunk/gcc/opt-suggestions.h trunk/gcc/opts.c trunk/gcc/testsuite/ChangeLog