[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)
commita056684c335995214f6d3467c699d32f8e73b763
treef7bf3664fb87e6bc144ea1254d4e90e91de84961
parent93a825c8fb91b26a1a6e92bbbb01ea78c34d09d8
[docs][tools] Add missing "program" tags to rst files

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

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