aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.h
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2024-01-04 09:36:28 -0500
committerDavid Malcolm <dmalcolm@redhat.com>2024-01-04 09:36:28 -0500
commit4ded42c2c5a5c977dbf67b71c5d78f8a6dca7cbb (patch)
tree3f3c45a67da8464752a6c2bb30821a3e08e0d04f /gcc/opts.h
parent6ecc1e32353e331137647a65a611eeb01b22184c (diff)
downloadgcc-4ded42c2c5a5c977dbf67b71c5d78f8a6dca7cbb.zip
gcc-4ded42c2c5a5c977dbf67b71c5d78f8a6dca7cbb.tar.gz
gcc-4ded42c2c5a5c977dbf67b71c5d78f8a6dca7cbb.tar.bz2
options: wire up options-urls.cc into gcc_urlifier
Changed in v2: - split out from the code that generates options-urls.cc - call the generated function, rather than use a generated array - pass around lang_mask gcc/ChangeLog: * diagnostic.h (diagnostic_make_option_url_cb): Add lang_mask param. (diagnostic_context::make_option_url): Update for lang_mask param. * gcc-urlifier.cc: Include "opts.h" and "options.h". (gcc_urlifier::gcc_urlifier): Add lang_mask param. (gcc_urlifier::m_lang_mask): New field. (doc_urls): Make static. (gcc_urlifier::get_url_for_quoted_text): Use label_text. (gcc_urlifier::get_url_suffix_for_quoted_text): Use label_text. Look for an option by name before trying a binary search in doc_urls. (gcc_urlifier::get_url_suffix_for_quoted_text): Use label_text. (gcc_urlifier::get_url_suffix_for_option): New. (make_gcc_urlifier): Add lang_mask param. (selftest::gcc_urlifier_cc_tests): Update for above changes. Verify that a URL is found for "-fpack-struct". * gcc-urlifier.def: Drop options "--version" and "-fpack-struct". * gcc-urlifier.h (make_gcc_urlifier): Add lang_mask param. * gcc.cc (driver::global_initializations): Pass 0 for lang_mask to make_gcc_urlifier. * opts-diagnostic.h (get_option_url): Add lang_mask param. * opts.cc (get_option_html_page): Remove special-casing for analyzer and LTO. (get_option_url_suffix): New. (get_option_url): Reimplement. (selftest::test_get_option_html_page): Rename to... (selftest::test_get_option_url_suffix): ...this and update for above changes. (selftest::opts_cc_tests): Update for renaming. * opts.h: Include "rich-location.h". (get_option_url_suffix): New decl. gcc/testsuite/ChangeLog: * lib/gcc-dg.exp: Set TERM to xterm. gcc/ChangeLog: * toplev.cc (general_init): Pass lang_mask to urlifier. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/opts.h')
-rw-r--r--gcc/opts.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/opts.h b/gcc/opts.h
index 20419e4..64f94f6 100644
--- a/gcc/opts.h
+++ b/gcc/opts.h
@@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_OPTS_H
#define GCC_OPTS_H
+#include "rich-location.h"
#include "obstack.h"
/* Specifies how a switch's VAR_VALUE relates to its FLAG_VAR. */
@@ -569,4 +570,7 @@ struct switchstr
bool ordering;
};
+extern label_text
+get_option_url_suffix (int option_index, unsigned lang_mask);
+
#endif