From a056684c335995214f6d3467c699d32f8e73b763 Mon Sep 17 00:00:00 2001 From: James Henderson Date: Thu, 27 Jun 2019 13:24:46 +0000 Subject: [docs][tools] Add missing "program" tags to rst files Sphinx allows for definitions of command-line options using `.. option ` and references to those options via `:option:`. 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 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 --- llvm/docs/CommandGuide/llvm-objdump.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/docs/CommandGuide/llvm-objdump.rst') diff --git a/llvm/docs/CommandGuide/llvm-objdump.rst b/llvm/docs/CommandGuide/llvm-objdump.rst index 3a4549e6160..be4d07c94d0 100644 --- a/llvm/docs/CommandGuide/llvm-objdump.rst +++ b/llvm/docs/CommandGuide/llvm-objdump.rst @@ -1,6 +1,8 @@ llvm-objdump - LLVM's object file dumper ======================================== +.. program:: llvm-objdump + SYNOPSIS -------- -- cgit v1.2.3