]> granicus.if.org Git - llvm/commitdiff
[docs][tools] Add missing "program" tags to rst files
authorJames Henderson <jh7370@my.bristol.ac.uk>
Thu, 27 Jun 2019 13:24:46 +0000 (13:24 +0000)
committerJames Henderson <jh7370@my.bristol.ac.uk>
Thu, 27 Jun 2019 13:24:46 +0000 (13:24 +0000)
Sphinx allows for definitions of command-line options using
`.. option <name>` and references to those options via `:option:<name>`.
However, it looks like there is no scoping of these options by default,
meaning that links can end up pointing to incorrect documents. See for
example the llvm-mca document, which contains references to -o that,
prior to this patch, pointed to a different document. What's worse is
that these links appear to be non-deterministic in which one is picked
(on my machine, some references end up pointing to opt, whereas on the
live docs, they point to llvm-dwarfdump, for example).

The fix is to add the .. program <name> tag. This essentially namespaces
the options (definitions and references) to the named program, ensuring
that the links are kept correct.

Reviwed by: andreadb

Differential Revision: https://reviews.llvm.org/D63873

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364538 91177308-0d34-0410-b5e6-96231b3b80d8

33 files changed:
docs/CommandGuide/FileCheck.rst
docs/CommandGuide/bugpoint.rst
docs/CommandGuide/dsymutil.rst
docs/CommandGuide/lit.rst
docs/CommandGuide/llc.rst
docs/CommandGuide/lli.rst
docs/CommandGuide/llvm-ar.rst
docs/CommandGuide/llvm-as.rst
docs/CommandGuide/llvm-bcanalyzer.rst
docs/CommandGuide/llvm-build.rst
docs/CommandGuide/llvm-config.rst
docs/CommandGuide/llvm-cov.rst
docs/CommandGuide/llvm-cxxfilt.rst
docs/CommandGuide/llvm-cxxmap.rst
docs/CommandGuide/llvm-diff.rst
docs/CommandGuide/llvm-dis.rst
docs/CommandGuide/llvm-dwarfdump.rst
docs/CommandGuide/llvm-exegesis.rst
docs/CommandGuide/llvm-extract.rst
docs/CommandGuide/llvm-lib.rst
docs/CommandGuide/llvm-link.rst
docs/CommandGuide/llvm-lipo.rst
docs/CommandGuide/llvm-mca.rst
docs/CommandGuide/llvm-nm.rst
docs/CommandGuide/llvm-objdump.rst
docs/CommandGuide/llvm-pdbutil.rst
docs/CommandGuide/llvm-profdata.rst
docs/CommandGuide/llvm-readobj.rst
docs/CommandGuide/llvm-stress.rst
docs/CommandGuide/llvm-symbolizer.rst
docs/CommandGuide/opt.rst
docs/CommandGuide/tblgen.rst
docs/WritingAnLLVMPass.rst

index 36f517ef62a77061266effacf41fdf1ffbeb826e..a424606d4ce0a206656aaf08102263937ae524fa 100644 (file)
@@ -1,6 +1,8 @@
 FileCheck - Flexible pattern matching file verifier
 ===================================================
 
+.. program:: FileCheck
+
 SYNOPSIS
 --------
 
index 8c2a0d124981b404f20a126ba191b959fe477f34..4a8ce933e1a5ffad741dc02032635563c78fe73f 100644 (file)
@@ -1,6 +1,8 @@
 bugpoint - automatic test case reduction tool
 =============================================
 
+.. program:: bugpoint
+
 SYNOPSIS
 --------
 
index ceaa54019a819b24a93354b2bdff7ea696035c0b..79925a73a8ce4b848548b8060cec637a95b08005 100644 (file)
@@ -1,6 +1,8 @@
 dsymutil - manipulate archived DWARF debug symbol files
 =======================================================
 
+.. program:: dsymutil
+
 SYNOPSIS
 --------
 
index e0d09ae977d5e70c8ecb1cd17c56fddb476f59ab..bcaa5c66c8c3f021736a850de80a05f459de51e0 100644 (file)
@@ -1,6 +1,8 @@
 lit - LLVM Integrated Tester
 ============================
 
+.. program:: lit
+
 SYNOPSIS
 --------
 
index aaf7e2e6b7728384c5ba337e21eb7b5dd048c267..bf62957b5c96a776b1dabd8f047b4df8b6fd422f 100644 (file)
@@ -1,6 +1,8 @@
 llc - LLVM static compiler
 ==========================
 
+.. program:: llc
+
 SYNOPSIS
 --------
 
@@ -41,6 +43,11 @@ End-user Options
 
  Print a summary of command line options.
 
+.. option:: -o <filename>
+
+ Use ``<filename>`` as the output filename. See the summary above for more
+ details.
+
 .. option:: -O=uint
 
  Generate code at different optimization levels.  These correspond to the
index 1132ac3e6be8aa1cce002d4ad65b87728b7ffc96..6d8cb4b36b526fea3f240f9124162cd759ff755c 100644 (file)
@@ -1,6 +1,8 @@
 lli - directly execute programs from LLVM bitcode
 =================================================
 
+.. program:: lli
+
 SYNOPSIS
 --------
 
index d10ec919795ce07cb80dfab34af5c10ea861cece..2d82abcc3703962a08552f9a77a7ed71871bb161 100644 (file)
@@ -1,6 +1,7 @@
 llvm-ar - LLVM archiver
 =======================
 
+.. program:: llvm-ar
 
 SYNOPSIS
 --------
index 1b499bbe9708e16c2cc21f6f384c03affef7a1e9..77b1568a9e41c75ccc2ed0bb8b3a45730ff8e80b 100644 (file)
@@ -1,6 +1,8 @@
 llvm-as - LLVM assembler
 ========================
 
+.. program:: llvm-as
+
 SYNOPSIS
 --------
 
index 7254088ec9461c9fb61703f9647331b4fbbdc6c4..369ea5eb7d97bf7453855d9108ac4b911d7ea19e 100644 (file)
@@ -1,6 +1,8 @@
 llvm-bcanalyzer - LLVM bitcode analyzer
 =======================================
 
+.. program:: llvm-bcanalyzer
+
 SYNOPSIS
 --------
 
index f788f7c5a83e8f8a05c86b514ad371ec58c7f2dd..d0331cad21af33c742b71261c94feb23ebd3d26c 100644 (file)
@@ -1,6 +1,7 @@
 llvm-build - LLVM Project Build Utility
 =======================================
 
+.. program:: llvm-build
 
 SYNOPSIS
 --------
index 34075d0b3086eb794a1fdd925566ff125db15cae..caee955c5fee924688c61fad8efcef9fcbdd9ff6 100644 (file)
@@ -1,6 +1,7 @@
 llvm-config - Print LLVM compilation options
 ============================================
 
+.. program:: llvm-config
 
 SYNOPSIS
 --------
index 7d696c9e3539538523e30bd425148f42285c3b10..d46497621687b6f3957fa385ac41e72f0d5d4f28 100644 (file)
@@ -1,6 +1,8 @@
 llvm-cov - emit coverage information
 ====================================
 
+.. program:: llvm-cov
+
 SYNOPSIS
 --------
 
index aad1ccda9d6866b164bbc53771c87038bffa5574..1b6f9c665e2656223e05b673b2318aa136c03dba 100644 (file)
@@ -1,6 +1,8 @@
 llvm-cxxfilt - LLVM symbol name demangler
 =========================================
 
+.. program:: llvm-cxxfilt
+
 SYNOPSIS
 --------
 
index 7293f60b55d00b2a78dcb4b53f08f346f4461d15..b0bf1c49fc20203732bcd8c22539fddafb3b43ca 100644 (file)
@@ -1,6 +1,8 @@
 llvm-cxxmap - Mangled name remapping tool
 =========================================
 
+.. program:: llvm-cxxmap
+
 SYNOPSIS
 --------
 
index 991d4fece04edb3d5232a90619b5b5288c021767..b858b981ed2b4b49c271389642daf1bdb48db96c 100644 (file)
@@ -1,6 +1,7 @@
 llvm-diff - LLVM structural 'diff'
 ==================================
 
+.. program:: llvm-diff
 
 SYNOPSIS
 --------
index 85cdca85ecdfdc5adf842d6f4df70e9b7234108a..aaba1280b8ad48bf1471ca07ad2994ea0d27928f 100644 (file)
@@ -1,6 +1,7 @@
 llvm-dis - LLVM disassembler
 ============================
 
+.. program:: llvm-dis
 
 SYNOPSIS
 --------
index b8ebc8aad8908cb2f552861c9a23ff1d88b44db2..e2cec42cea31bd04eae683d8ba59ae2d28d662b3 100644 (file)
@@ -1,6 +1,8 @@
 llvm-dwarfdump - dump and verify DWARF debug information
 ========================================================
 
+.. program:: llvm-dwarfdump
+
 SYNOPSIS
 --------
 
index cbb900914cfdd42644b0d4b5c808a11931fb29d4..8f9ec1eed52096395113723c9491bac62565de8d 100644 (file)
@@ -1,6 +1,8 @@
 llvm-exegesis - LLVM Machine Instruction Benchmark
 ==================================================
 
+.. program:: llvm-exegesis
+
 SYNOPSIS
 --------
 
index d0e9c1c255abd0920c5247609af73e3104b3dd50..345496b945698907c902b345086d03b7acbdc0db 100644 (file)
@@ -1,6 +1,8 @@
 llvm-extract - extract a function from an LLVM module
 =====================================================
 
+.. program:: llvm-extract
+
 SYNOPSIS
 --------
 
index ecd0a7db7e374439932e99179075eab45c540775..87687be785fa30e48c939c65884afbd239e0f840 100644 (file)
@@ -1,6 +1,7 @@
 llvm-lib - LLVM lib.exe compatible library tool
 ===============================================
 
+.. program:: llvm-lib
 
 SYNOPSIS
 --------
index 3bcfa68c25990315060305cc02a2474d68a1bd07..761997928c27a9127152ef8d3a7e80bc7140f8ae 100644 (file)
@@ -1,6 +1,8 @@
 llvm-link - LLVM bitcode linker
 ===============================
 
+.. program:: llvm-link
+
 SYNOPSIS
 --------
 
index ebc540a2ae81db59e91977af1c38ecf9108df3a2..13f56347836ec226718432741f2f32a5628dcae6 100644 (file)
@@ -1,6 +1,8 @@
 llvm-lipo - LLVM tool for manipulating universal binaries
 =========================================================
 
+.. program:: llvm-lipo
+
 SYNOPSIS
 --------
 
index 847a043fe7adeb690fc313e84aced0c935ac06e5..a02103337dcb2f1aaf4b8dc655c11de4aabf8960 100644 (file)
@@ -1,6 +1,8 @@
 llvm-mca - LLVM Machine Code Analyzer
 =====================================
 
+.. program:: llvm-mca
+
 SYNOPSIS
 --------
 
@@ -64,6 +66,11 @@ option specifies "``-``", then the output will also be sent to standard output.
 
  Print a summary of command line options.
 
+.. option:: -o <filename>
+
+ Use ``<filename>`` as the output filename. See the summary above for more
+ details.
+
 .. option:: -mtriple=<target triple>
 
  Specify a target triple string.
index 85e66d75e81f81c8cca83a3641d8a2521c1e9c6b..6268b15d08269d47234932017d5fe1cc81bfe946 100644 (file)
@@ -1,6 +1,8 @@
 llvm-nm - list LLVM bitcode and object file's symbol table
 ==========================================================
 
+.. program:: llvm-nm
+
 SYNOPSIS
 --------
 
index 3a4549e6160b9f2c618f482cdd90afb856512bf9..be4d07c94d08434279fa7bba4ce6fdd8680de437 100644 (file)
@@ -1,6 +1,8 @@
 llvm-objdump - LLVM's object file dumper
 ========================================
 
+.. program:: llvm-objdump
+
 SYNOPSIS
 --------
 
index 29d487e0e7409386a176ec8e26766a271e722ba9..955353187112c1b4ac00c9c79e426d8e595a65b8 100644 (file)
@@ -1,6 +1,8 @@
 llvm-pdbutil - PDB File forensics and diagnostics
 =================================================
 
+.. program:: llvm-pdbutil
+
 .. contents::
    :local:
 
index 7f5887ae9d3faf071ec9dda326f363eeb3d88367..bc0a0066aac78a7da6b450c0dd4735437819dd3e 100644 (file)
@@ -1,6 +1,8 @@
 llvm-profdata - Profile data tool
 =================================
 
+.. program:: llvm-profdata
+
 SYNOPSIS
 --------
 
index d533ae57e538574d355a6e0cd8af516b7879a782..7c3b946508e30c6a23cb3f2bcad21b9f8bf0da04 100644 (file)
@@ -1,6 +1,8 @@
 llvm-readobj - LLVM Object Reader
 =================================
 
+.. program:: llvm-readobj
+
 SYNOPSIS
 --------
 
index fb006f562b1264aa816d9ee03a3f1aedce4165c9..7f23681d644ad384113af3da7a14225d02db6362 100644 (file)
@@ -1,6 +1,8 @@
 llvm-stress - generate random .ll files
 =======================================
 
+.. program:: llvm-stress
+
 SYNOPSIS
 --------
 
index 98f25540eebe3efbff558fc37d55aca515355842..7f3a8a4e27ecf9c1be76f6ff03d661a412c401cb 100644 (file)
@@ -1,6 +1,8 @@
 llvm-symbolizer - convert addresses into source code locations
 ==============================================================
 
+.. program:: llvm-symbolizer
+
 SYNOPSIS
 --------
 
index 2b2fffa063a0f73020d16551e273fe62bcffd29d..10eff31d4c12ade4e718e8f7583620f27480e4d2 100644 (file)
@@ -1,6 +1,8 @@
 opt - LLVM optimizer
 ====================
 
+.. program:: opt
+
 SYNOPSIS
 --------
 
index 3105e0c8076710abdcdbaa2ca800150b8c837e9b..372d1b2a73086ff0938a0a4441259a6f2fab7a1c 100644 (file)
@@ -1,6 +1,8 @@
 tblgen - Target Description To C++ Code Generator
 =================================================
 
+.. program:: tblgen
+
 SYNOPSIS
 --------
 
index 9e857fb96570f6950a24f228bf53b73c6cb24e69..7e2cabb9e8fb6b9c8d9f9aee25a4d6e86e6f9ae0 100644 (file)
@@ -2,6 +2,8 @@
 Writing an LLVM Pass
 ====================
 
+.. program:: opt
+
 .. contents::
     :local:
 
@@ -264,7 +266,7 @@ documentation to users of :program:`opt`.  Now that you have a working pass,
 you would go ahead and make it do the cool transformations you want.  Once you
 get it all working and tested, it may become useful to find out how fast your
 pass is.  The :ref:`PassManager <writing-an-llvm-pass-passmanager>` provides a
-nice command line option (:option:`--time-passes`) that allows you to get
+nice command line option (:option:`-time-passes`) that allows you to get
 information about the execution time of your pass along with the other passes
 you queue up.  For example: