Come up with TARGET_GET_VALID_OPTION_VALUES option hook (PR driver/83193).
commitb2903606a95ff609a65abe7ac0cbf4321ad2614d
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 3 Sep 2018 08:16:27 +0000 (3 08:16 +0000)
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 3 Sep 2018 08:16:27 +0000 (3 08:16 +0000)
treef170c789ad3b3928dd6a9c1052207da98693895c
parent8d9721cc670c8b9186e3ebb0168d9931eacc2cb8
Come up with TARGET_GET_VALID_OPTION_VALUES option hook (PR driver/83193).

2018-09-03  Martin Liska  <mliska@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  <mliska@suse.cz>

        PR driver/83193
* gcc.dg/completion-4.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264052 138bc75d-0d04-0410-961f-82ee72b054a4
14 files changed:
gcc/ChangeLog
gcc/common/common-target.def
gcc/common/common-targhooks.c
gcc/common/common-targhooks.h
gcc/common/config/i386/i386-common.c
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/doc/tm.texi
gcc/doc/tm.texi.in
gcc/opt-suggestions.c
gcc/opt-suggestions.h
gcc/opts.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/completion-4.c [new file with mode: 0644]