aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc-urlifier.cc
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
commit6ecc1e32353e331137647a65a611eeb01b22184c (patch)
treeb8c38faaf78bd30663e798d5583b7788bb862e73 /gcc/gcc-urlifier.cc
parent5bb18475a10d05d2aebf37db73ebf36c6912104d (diff)
downloadgcc-6ecc1e32353e331137647a65a611eeb01b22184c.zip
gcc-6ecc1e32353e331137647a65a611eeb01b22184c.tar.gz
gcc-6ecc1e32353e331137647a65a611eeb01b22184c.tar.bz2
opts: add logic to generate options-urls.cc
Changed in v2: - split out from the code that uses this - now handles lang-specific URLs, as well as generic URLs - the generated options-urls.cc now contains a function with a switch statement, rather than an array, to support lang-specific URLs: const char * get_opt_url_suffix (int option_index, unsigned lang_mask) { switch (option_index) { [...snip...] case OPT_B: if (lang_mask & CL_D) return "gdc/Directory-Options.html#index-B"; return "gcc/Directory-Options.html#index-B"; [...snip...] return nullptr; } gcc/ChangeLog: * Makefile.in (ALL_OPT_URL_FILES): New. (GCC_OBJS): Add options-urls.o. (OBJS): Likewise. (OBJS-libcommon): Likewise. (s-options): Depend on $(ALL_OPT_URL_FILES), and add this to inputs to opt-gather.awk. (options-urls.cc): New Makefile target. * opt-functions.awk (url_suffix): New function. (lang_url_suffix): New function. * options-urls-cc-gen.awk: New file. * opts.h (get_opt_url_suffix): New decl. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/gcc-urlifier.cc')
0 files changed, 0 insertions, 0 deletions