GCC Middle and Back End API Reference
regenerate-opt-urls Namespace Reference

Data Structures

class  Index
 
class  OptFile
 
class  TestFiltering
 
class  TestParsingIndex
 

Functions

 canonicalize_option_name (option_name)
 
 canonicalize_url_suffix (url_suffix)
 
 target_specific (url_suffix)
 
 filter_urlsuffixes_for_optfile (optfile, url_suffixes)
 
 write_url_file (index, optfile, dstfile)
 
 main (args)
 

Variables

str DESCRIPTION
 
dict TARGET_SPECIFIC_PAGES
 
list PER_LANGUAGE_OPTION_INDEXES
 
 parser
 
 type
 
 action
 
 args = parser.parse_args()
 
 INPUT_HTML_PATH = args.base_html_dir
 
 argv
 

Function Documentation

◆ canonicalize_option_name()

regenerate-opt-urls.canonicalize_option_name ( option_name)

◆ canonicalize_url_suffix()

regenerate-opt-urls.canonicalize_url_suffix ( url_suffix)
Various options have anchors for both the positive and
negative form.  For example -Wcpp has both:
  'gcc/Warning-Options.html#index-Wno-cpp'
  'gcc/Warning-Options.html#index-Wcpp'

Return a canonicalized version of the url_suffix that
strips out any "no-" prefixes, for use in deduplication.
Note that the resulting url suffix might not correspond to
an actual anchor in the HTML.

References ggc_alloc().

Referenced by regenerate-opt-urls.Index.add_entry().

◆ filter_urlsuffixes_for_optfile()

regenerate-opt-urls.filter_urlsuffixes_for_optfile ( optfile,
url_suffixes )
Filter out target-specific options for the wrong target.

References ggc_alloc(), and target_specific().

Referenced by regenerate-opt-urls.TestFiltering.test_filter(), and write_url_file().

◆ main()

regenerate-opt-urls.main ( args)

References ggc_alloc(), and write_url_file().

◆ target_specific()

regenerate-opt-urls.target_specific ( url_suffix)

◆ write_url_file()

regenerate-opt-urls.write_url_file ( index,
optfile,
dstfile )

References filter_urlsuffixes_for_optfile(), and ggc_alloc().

Referenced by main().

Variable Documentation

◆ action

regenerate-opt-urls.action

◆ args

regenerate-opt-urls.args = parser.parse_args()

◆ argv

regenerate-opt-urls.argv

◆ DESCRIPTION

str regenerate-opt-urls.DESCRIPTION
Initial value:
1= """
2Parses the generated HTML (from "make html") to locate anchors
3for options, then parses the .opt files within the source tree,
4and generates a .opt.urls in the source tree for each .opt file,
5giving URLs for each option, where it can.
6
7Usage (from build/gcc subdirectory):
8 ../../src/gcc/regenerate-opt-urls.py HTML/gcc-14.0.0/ ../../src
9
10To run unit tests:
11 ../../src/gcc/regenerate-opt-urls.py HTML/gcc-14.0.0/ ../../src --unit-test
12"""

◆ INPUT_HTML_PATH

regenerate-opt-urls.INPUT_HTML_PATH = args.base_html_dir

◆ parser

regenerate-opt-urls.parser
Initial value:
1= argparse.ArgumentParser(description=DESCRIPTION,
T * ggc_alloc(ALONE_CXX_MEM_STAT_INFO)
Definition ggc.h:184

◆ PER_LANGUAGE_OPTION_INDEXES

list regenerate-opt-urls.PER_LANGUAGE_OPTION_INDEXES
Initial value:
1= [
2 ('gcc/Option-Index.html', None),
3 ('gdc/Option-Index.html', 'D'),
4 ('gfortran/Option-Index.html', 'Fortran')
5]

◆ TARGET_SPECIFIC_PAGES

dict regenerate-opt-urls.TARGET_SPECIFIC_PAGES

◆ type

regenerate-opt-urls.type