diff options
author | David Malcolm <dmalcolm@redhat.com> | 2024-01-10 08:33:48 -0500 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2024-01-10 08:33:48 -0500 |
commit | be2bf5dc93ca1ec148c605a5f25b3f7a3028bf3d (patch) | |
tree | e1f6b7e553c22d4ccbf4789636816338b8440a48 /gcc/tree-vect-loop.cc | |
parent | 5daf9104ed5d4ef21b01e9564e5325adb157e5d8 (diff) | |
download | gcc-be2bf5dc93ca1ec148c605a5f25b3f7a3028bf3d.zip gcc-be2bf5dc93ca1ec148c605a5f25b3f7a3028bf3d.tar.gz gcc-be2bf5dc93ca1ec148c605a5f25b3f7a3028bf3d.tar.bz2 |
gcc-urlifier: handle option prefixes such as '-fno-'
Given e.g. this missppelled option (omitting the trailing 's'):
$ LANG=C ./xgcc -B. -fno-inline-small-function
xgcc: error: unrecognized command-line option '-fno-inline-small-function'; did you mean '-fno-inline-small-functions'?
we weren't providing a documentation URL for the suggestion.
The issue is the URLification code uses find_opt, which doesn't consider
the various '-fno-' prefixes.
This patch adds a way to find the pertinent prefix remapping and uses it
when determining URLs.
With this patch, the suggestion '-fno-inline-small-functions' now gets a
documentation link (to that of '-finline-small-functions').
gcc/ChangeLog:
* gcc-urlifier.cc (gcc_urlifier::get_url_suffix_for_option):
Handle prefix mappings before calling find_opt.
(selftest::gcc_urlifier_cc_tests): Add example of urlifying a
"-fno-"-prefixed command-line option.
* opts-common.cc (get_option_prefix_remapping): New.
* opts.h (get_option_prefix_remapping): New decl.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/tree-vect-loop.cc')
0 files changed, 0 insertions, 0 deletions