https://github.com/rnk created https://github.com/llvm/llvm-project/pull/239864

Use the shared intersphinx mapping in the LLVM docs and replace absolute URLs 
to other subprojects (mostly Clang, plus lld, lldb, libc++, OpenMP and Flang) 
with `inv:` links. The `inv:` Markdown link syntax keeps the source readable, 
for example ``[Flang documentation](inv:flang:std:doc#FortranLLVMTestSuite)``.

Each link is resolved against the target project's inventory during the build, 
so a renamed page or label is now a build warning instead of a silent dead 
link. A few links remain absolute where the target is not in an inventory or 
the file is mainly read on GitHub; those can be handled separately.

Part of #214861. This is the second of three stacked PRs and depends on the 
inventory PR below it.

The LLVM docs build cleanly with warnings as errors against the live 
inventories, and the generated HTML points at the expected pages.


>From b93f6bf015fbae6ffa40982facdde9cb772901ac Mon Sep 17 00:00:00 2001
From: Reid Kleckner <[email protected]>
Date: Fri, 11 Sep 2026 22:13:52 +0000
Subject: [PATCH] [docs] Use intersphinx for LLVM cross-project links

Configure the LLVM documentation with the external project inventories it
references and replace absolute cross-project documentation URLs with
validated intersphinx document and reference roles.

Part of #214861

LLM-aided
---
 llvm/docs/AMDGPUUsage.md            |  8 +++----
 llvm/docs/CMake.md                  |  7 +++---
 llvm/docs/CodingStandards.md        |  7 +++---
 llvm/docs/CoverageMappingFormat.md  |  4 ++--
 llvm/docs/DTLTO.md                  |  4 ++--
 llvm/docs/DebuggingLLVM.md          |  2 +-
 llvm/docs/DeveloperPolicy.md        |  2 +-
 llvm/docs/ExceptionHandling.md      |  3 +--
 llvm/docs/FuzzingLLVM.md            |  3 +--
 llvm/docs/GettingInvolved.md        |  2 +-
 llvm/docs/GettingStarted.md         | 11 +++++----
 llvm/docs/GettingStartedVS.md       |  4 ++--
 llvm/docs/GwpAsan.md                |  2 +-
 llvm/docs/HowToCrossCompileLLVM.md  |  2 +-
 llvm/docs/InstrProfileFormat.md     |  3 ++-
 llvm/docs/LangRef.md                | 35 +++++++++++++++--------------
 llvm/docs/Lexicon.md                |  2 +-
 llvm/docs/LibFuzzer.md              | 13 +++++------
 llvm/docs/MemTagSanitizer.md        |  5 ++---
 llvm/docs/PointerAuth.md            |  2 +-
 llvm/docs/Remarks.md                |  2 +-
 llvm/docs/SymbolizerMarkupFormat.md |  2 +-
 llvm/docs/TestSuiteGuide.md         |  2 +-
 llvm/docs/TypeMetadata.md           |  4 ++--
 llvm/docs/conf.py                   |  3 +--
 25 files changed, 64 insertions(+), 70 deletions(-)

diff --git a/llvm/docs/AMDGPUUsage.md b/llvm/docs/AMDGPUUsage.md
index 8a8eb1d0b6fc40..899757e5a3d148 100644
--- a/llvm/docs/AMDGPUUsage.md
+++ b/llvm/docs/AMDGPUUsage.md
@@ -1606,7 +1606,7 @@ Modules that do not use buffer operations or are 
indifferent to OOB semantics
 
 ### Target ID
 
-AMDGPU supports target IDs. See [Clang Offload 
Bundler](https://clang.llvm.org/docs/ClangOffloadBundler.html) for a general
+AMDGPU supports target IDs. See [Clang Offload 
Bundler](inv:clang:std:doc#ClangOffloadBundler) for a general
 description. The AMDGPU target specific information is:
 
 **processor**
@@ -1632,7 +1632,7 @@ description. The AMDGPU target specific information is:
 #### Code Object V2 to V3 Target ID
 
 The target ID syntax for code object V2 to V3 is the same as defined in [Clang
-Offload Bundler](https://clang.llvm.org/docs/ClangOffloadBundler.html) except
+Offload Bundler](inv:clang:std:doc#ClangOffloadBundler) except
 when used in the {ref}`amdgpu-assembler-directive-amdgcn-target` assembler
 directive and the bundle entry ID. In those cases it has the following BNF
 syntax:
@@ -1653,7 +1653,7 @@ The code object V2 to V3 cannot represent *Any* and 
treats it the same as
 ### Embedding Bundled Code Objects
 
 AMDGPU supports the HIP and OpenMP languages that perform code object embedding
-as described in [Clang Offload 
Bundler](https://clang.llvm.org/docs/ClangOffloadBundler.html).
+as described in [Clang Offload Bundler](inv:clang:std:doc#ClangOffloadBundler).
 
 :::{note}
 The target ID syntax used for code object V2 to V3 for a bundle entry ID
@@ -18239,7 +18239,7 @@ effort required to accurately calculate GPR usage.
 [AMD-ROCm-Release-Notes] [AMD ROCm Release Notes](https://github.com/ROCm/ROCm)
 
 (clang-attr)=
-[CLANG-ATTR] [Attributes in 
Clang](https://clang.llvm.org/docs/AttributeReference.html)
+[CLANG-ATTR] [Attributes in Clang](inv:clang:std:doc#AttributeReference)
 
 (dwarf)=
 [DWARF] [DWARF Debugging Information Format](http://dwarfstd.org/)
diff --git a/llvm/docs/CMake.md b/llvm/docs/CMake.md
index 8773c8e6063ac0..3e945abbb891cd 100644
--- a/llvm/docs/CMake.md
+++ b/llvm/docs/CMake.md
@@ -389,7 +389,7 @@ sub-projects. Nearly all of these variable names begin with 
`LLVM_`.
 **LLVM_BUILD_INSTRUMENTED_COVERAGE**:BOOL
 
 :   If enabled, [source-based code
-    coverage](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html)
+    coverage](inv:clang:std:doc#SourceBasedCodeCoverage)
     instrumentation is enabled while building llvm. If CMake can locate the
     code coverage scripts and the llvm-cov and llvm-profdata tools that pair
     with your compiler, the build will also generate the
@@ -623,8 +623,7 @@ sub-projects. Nearly all of these variable names begin with 
`LLVM_`.
 
 **LLVM_ENABLE_MODULES**:BOOL
 
-:   Compile with [Clang Header
-    Modules](https://clang.llvm.org/docs/Modules.html).
+:   Compile with [Clang Header Modules](inv:clang:std:doc#Modules).
 
 (llvm_enable_pdb)=
 
@@ -687,7 +686,7 @@ sub-projects. Nearly all of these variable names begin with 
`LLVM_`.
     toolchain. It will build the builtins separately from the other runtimes to
     preserve correct dependency ordering. If you want to build the runtimes
     using a system compiler, see the [libc++
-    documentation](https://libcxx.llvm.org/VendorDocumentation.html).
+    documentation](inv:libcxx:std:doc#VendorDocumentation).
 
     :::{note}
     The list should not have duplicates with `LLVM_ENABLE_PROJECTS`.
diff --git a/llvm/docs/CodingStandards.md b/llvm/docs/CodingStandards.md
index ef458e6f28b0d3..2a1f85ab3ce0fb 100644
--- a/llvm/docs/CodingStandards.md
+++ b/llvm/docs/CodingStandards.md
@@ -60,7 +60,7 @@ Each toolchain provides a good reference for what it accepts:
 
 * Clang: https://clang.llvm.org/cxx_status.html
 
-  * libc++: https://libcxx.llvm.org/Status/Cxx17.html
+  * libc++: [C++17 status](inv:libcxx:std:doc#Status/Cxx17)
 
 * GCC: https://gcc.gnu.org/projects/cxx-status.html#cxx17
 
@@ -537,9 +537,8 @@ llvm::Constant *Mask[] = {
 ```
 
 This formatting scheme also makes it particularly easy to get predictable,
-consistent, and automatic formatting with tools like [Clang Format].
-
-[Clang Format]: https://clang.llvm.org/docs/ClangFormat.html
+consistent, and automatic formatting with tools like
+[Clang Format](inv:clang:std:doc#ClangFormat).
 
 ### Language and Compiler Issues
 
diff --git a/llvm/docs/CoverageMappingFormat.md 
b/llvm/docs/CoverageMappingFormat.md
index 02fab85fa1c814..6d825b530c86c5 100644
--- a/llvm/docs/CoverageMappingFormat.md
+++ b/llvm/docs/CoverageMappingFormat.md
@@ -10,8 +10,8 @@ analysis using LLVM's and Clang's instrumentation based 
profiling
 This document is aimed at those who would like to know how LLVM's code coverage
 mapping works under the hood. A prior knowledge of how Clang's profile guided
 optimization works is useful, but not required. For those interested in using
-LLVM to provide code coverage analysis for their own programs, see the [Clang
-documentation](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html).
+LLVM to provide code coverage analysis for their own programs, see the
+[Clang documentation](inv:clang:std:doc#SourceBasedCodeCoverage).
 
 We start by briefly describing LLVM's code coverage mapping format and the
 way that Clang and LLVM's code coverage tool work with this format. After
diff --git a/llvm/docs/DTLTO.md b/llvm/docs/DTLTO.md
index c498cae3b8ebf6..bc62f20ae635af 100644
--- a/llvm/docs/DTLTO.md
+++ b/llvm/docs/DTLTO.md
@@ -88,8 +88,8 @@ also be specified. Such options are transparently forwarded.
 The backend compilations are currently performed by invoking Clang. For further
 details, refer to:
 
-- Clang documentation: <https://clang.llvm.org/docs/ThinLTO.html>
-- LLD documentation: <https://lld.llvm.org/DTLTO.html>
+- Clang documentation: [ThinLTO](inv:clang:std:doc#ThinLTO)
+- [LLD documentation](inv:lld:std:doc#DTLTO)
 
 When invoked with a distributor, LLD generates a JSON file describing the
 backend compilation jobs and executes the distributor, passing it this file.
diff --git a/llvm/docs/DebuggingLLVM.md b/llvm/docs/DebuggingLLVM.md
index 652c6deba2b2e4..4171291f161a1a 100644
--- a/llvm/docs/DebuggingLLVM.md
+++ b/llvm/docs/DebuggingLLVM.md
@@ -166,6 +166,6 @@ option to avoid data structures being printed as a big 
block of text.
 [Bear]: https://github.com/rizsotto/Bear
 [PrintPasses.cpp]: 
https://github.com/llvm/llvm-project/blob/main/llvm/lib/IR/PrintPasses.cpp
 [rr]: https://rr-project.org
-[LLDB data formatters]: https://lldb.llvm.org/resources/dataformatters.html
+[LLDB data formatters]: inv:lldb:std:doc#resources/dataformatters
 [GDB pretty printers]: 
https://sourceware.org/gdb/onlinedocs/gdb/Pretty-Printing.html
 [print pretty]: 
https://sourceware.org/gdb/current/onlinedocs/gdb.html/Print-Settings.html
diff --git a/llvm/docs/DeveloperPolicy.md b/llvm/docs/DeveloperPolicy.md
index 79ce9f8dcd69fc..fbfc1c8dc0da86 100644
--- a/llvm/docs/DeveloperPolicy.md
+++ b/llvm/docs/DeveloperPolicy.md
@@ -211,7 +211,7 @@ features added. Some tips for getting your testcase 
approved:
   
[llvm/utils/update_llc_test_checks.py](https://github.com/llvm/llvm-project/blob/main/llvm/utils/update_llc_test_checks.py)
 - Some subprojects such as `clang` and `clangd` have project specific testing
   tools, like the `clang -verify` flag
-  
([docs](https://clang.llvm.org/docs/InternalsManual.html#verifying-diagnostics))
+  ([docs](inv:clang:std:label#verifying-diagnostics))
   and the `clangd -lit-test` flag, which are preferred over `FileCheck`.
 - Changes to libraries, such as Support, which are not directly observable
   through tool invocations, are often best tested with unit tests. Unit tests
diff --git a/llvm/docs/ExceptionHandling.md b/llvm/docs/ExceptionHandling.md
index 4b6cf835bac7f3..aaf82f3a836bb9 100644
--- a/llvm/docs/ExceptionHandling.md
+++ b/llvm/docs/ExceptionHandling.md
@@ -791,7 +791,7 @@ items that need to be implemented.
   you have to handle `EH_RETURN` in `TargetLowering`.
 
 If you don't leverage the existing runtime (`libstdc++` and `libgcc`),
-you have to take a look at [libc++] and
+you have to take a look at [libc++](inv:libcxx:std:doc#index) and
 [libunwind]
 to see what has to be done there. For `libunwind`, you have to do the 
following:
 
@@ -823,4 +823,3 @@ to see what has to be done there. For `libunwind`, you have 
to do the following:
 [CFI directives]: https://sourceware.org/binutils/docs/as/CFI-directives.html
 [libgcc]: https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html
 [libunwind]: https://clang.llvm.org/docs/Toolchain.html#unwind-library
-[libc++]: https://libcxx.llvm.org/
diff --git a/llvm/docs/FuzzingLLVM.md b/llvm/docs/FuzzingLLVM.md
index 8cc37f9a1eb4df..93b21d62a25168 100644
--- a/llvm/docs/FuzzingLLVM.md
+++ b/llvm/docs/FuzzingLLVM.md
@@ -37,7 +37,7 @@ level:
 
 ### clang-format-fuzzer
 
-A {{ generic_fuzzer }} that runs [clang-format][clang-format] on C++ text 
fragments. Some of the
+A {{ generic_fuzzer }} that runs [clang-format](inv:clang:std:doc#ClangFormat) 
on C++ text fragments. Some of the
 bugs this fuzzer has reported are [on bugzilla](https://llvm.org/pr23052)
 and [on OSS Fuzz's 
tracker](https://bugs.chromium.org/p/oss-fuzz/issues/list?q=proj-llvm+clang-format-fuzzer).
 
@@ -235,7 +235,6 @@ similarly to functions such as `add_llvm_tool`, but it 
takes care of linking
 to LibFuzzer when appropriate and can be passed the `DUMMY_MAIN` argument to
 enable standalone testing.
 
-[clang-format]: https://clang.llvm.org/docs/ClangFormat.html
 [discussed at eurollvm 2017]: https://www.youtube.com/watch?v=UBbQ_s6hNgg
 [libprotobuf-mutator]: https://github.com/google/libprotobuf-mutator
 [llvm on oss fuzz]: 
https://github.com/google/oss-fuzz/blob/master/projects/llvm
diff --git a/llvm/docs/GettingInvolved.md b/llvm/docs/GettingInvolved.md
index 26aa6ca09ed8b4..511b564f7f1095 100644
--- a/llvm/docs/GettingInvolved.md
+++ b/llvm/docs/GettingInvolved.md
@@ -183,7 +183,7 @@ what to add to your calendar invite.
      -
      -
    * - OpenMP
-     - Multiple meeting series, [documented 
here](https://openmp.llvm.org/docs/SupportAndFAQ.html)
+     - Multiple meeting series, [documented 
here](inv:openmp:std:doc#SupportAndFAQ)
      -
      -
    * - LLVM Alias Analysis
diff --git a/llvm/docs/GettingStarted.md b/llvm/docs/GettingStarted.md
index ab4e4bdce04765..9c86ad3dcb93a3 100644
--- a/llvm/docs/GettingStarted.md
+++ b/llvm/docs/GettingStarted.md
@@ -16,8 +16,8 @@ component compiles C, C++, Objective-C, and Objective-C++ 
code into LLVM bitcode
 -- and from there into object files, using LLVM.
 
 Other components include:
-the [libc++ C++ standard library](https://libcxx.llvm.org),
-the [LLD linker](https://lld.llvm.org), and more.
+the [libc++ C++ standard library](inv:libcxx:std:doc#index),
+the [LLD linker](inv:lld:std:doc#index), and more.
 
 (sources)=
 ## Getting the Source Code and Building LLVM
@@ -80,7 +80,7 @@ the [LLD linker](https://lld.llvm.org), and more.
      * `-DLLVM_ENABLE_ASSERTIONS=ON` --- Compile with assertion checks enabled
        (default is ON for Debug builds, OFF for all other build types).
 
-     * `-DLLVM_USE_LINKER=lld` --- Link with the [lld 
linker](https://lld.llvm.org), assuming it
+     * `-DLLVM_USE_LINKER=lld` --- Link with the [lld 
linker](inv:lld:std:doc#index), assuming it
        is installed on your system. This can dramatically speed up link times
        if the default linker is slow.
 
@@ -631,11 +631,10 @@ with the latest Xcode:
 Note: There are some additional flags that need to be passed when building for
 iOS due to limitations in the iOS SDK.
 
-Check {doc}`HowToCrossCompileLLVM` and [Clang docs on how to cross-compile in 
general]
+Check {doc}`HowToCrossCompileLLVM` and
+[Clang docs on how to cross-compile in 
general](inv:clang:std:doc#CrossCompilation)
 for more information about cross-compiling.
 
-[Clang docs on how to cross-compile in general]: 
https://clang.llvm.org/docs/CrossCompilation.html
-
 ### The Location of LLVM Object Files
 
 The LLVM build system is capable of sharing a single LLVM source tree among
diff --git a/llvm/docs/GettingStartedVS.md b/llvm/docs/GettingStartedVS.md
index f70f1157b109ac..30985b77189f0f 100644
--- a/llvm/docs/GettingStartedVS.md
+++ b/llvm/docs/GettingStartedVS.md
@@ -74,7 +74,7 @@ These instructions were tested with Visual Studio 2019 and 
Python 3.9.6:
    users for the regression tests and make Python available from the command
    line.
 6. In the second install screen, select (again) **Install for all users** and
-   if you want to develop [lldb](https://lldb.llvm.org/), selecting
+   if you want to develop [lldb](inv:lldb:std:doc#index), selecting
    **Download debug binaries** is useful.
 7. Complete the Python installation.
 8. Run a "Developer Command Prompt for VS 2019" **as administrator**. This 
command
@@ -99,7 +99,7 @@ These instructions were tested with Visual Studio 2019 and 
Python 3.9.6:
     ```
 
     The DIA library is required for LLVM PDB tests and
-    [LLDB development](https://lldb.llvm.org/resources/build.html).
+    [LLDB development](inv:lldb:std:doc#resources/build).
 
 11. Install psutil and obtain the LLVM source code:
 
diff --git a/llvm/docs/GwpAsan.md b/llvm/docs/GwpAsan.md
index 181dc1ac465d94..9c3c08e1812a40 100644
--- a/llvm/docs/GwpAsan.md
+++ b/llvm/docs/GwpAsan.md
@@ -19,7 +19,7 @@ depending on the average size of your allocations.
 
 ## GWP-ASan vs. ASan
 
-Unlike [AddressSanitizer](https://clang.llvm.org/docs/AddressSanitizer.html),
+Unlike [AddressSanitizer](inv:clang:std:doc#AddressSanitizer),
 GWP-ASan does not induce a significant performance overhead. ASan often 
requires
 the use of dedicated canaries to be viable in production environments, and as
 such is often impractical. Moreover, ASan's runtime is not developed with
diff --git a/llvm/docs/HowToCrossCompileLLVM.md 
b/llvm/docs/HowToCrossCompileLLVM.md
index afcdecd3348aab..2e6a3ef0d9a782 100644
--- a/llvm/docs/HowToCrossCompileLLVM.md
+++ b/llvm/docs/HowToCrossCompileLLVM.md
@@ -6,7 +6,7 @@ This document contains information about building LLVM and
 Clang on a host machine, targeting another platform.
 
 For more information on how to use Clang as a cross-compiler,
-please check <https://clang.llvm.org/docs/CrossCompilation.html>.
+please check [Cross-compilation using 
Clang](inv:clang:std:doc#CrossCompilation).
 
 This document describes cross-building a compiler in a single stage, using an
 existing `clang` install as the host compiler.
diff --git a/llvm/docs/InstrProfileFormat.md b/llvm/docs/InstrProfileFormat.md
index 3fa1d2c4494150..f09e8c47645062 100644
--- a/llvm/docs/InstrProfileFormat.md
+++ b/llvm/docs/InstrProfileFormat.md
@@ -12,7 +12,8 @@ of interpretation across use cases, the documentation is 
based on IRPGO.
 
 :::{note}
 Frontend-generated profiles are used together with coverage mapping for
-[source-based code 
coverage](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html). The 
[coverage mapping format](CoverageMappingFormat.md) is different from
+[source-based code coverage](inv:clang:std:doc#SourceBasedCodeCoverage). The
+[coverage mapping format](CoverageMappingFormat.md) is different from
 profile format.
 :::
 
diff --git a/llvm/docs/LangRef.md b/llvm/docs/LangRef.md
index 9190d60092aa5d..a459371a7b2988 100644
--- a/llvm/docs/LangRef.md
+++ b/llvm/docs/LangRef.md
@@ -2710,7 +2710,7 @@ fn -> other_fn -> other_fn ; fn is norecurse
 
 `safestack`
 :   This attribute indicates that
-    [SafeStack](https://clang.llvm.org/docs/SafeStack.html)
+    [SafeStack](inv:clang:std:doc#SafeStack)
     protection is enabled for this function.
 
     If a function that has a `safestack` attribute is inlined into a
@@ -5662,7 +5662,7 @@ This is currently only supported for ELF binary formats.
 
 `no_cfi @func`
 
-With [Control-Flow Integrity 
(CFI)](https://clang.llvm.org/docs/ControlFlowIntegrity.html), a '`no_cfi`'
+With [Control-Flow Integrity (CFI)](inv:clang:std:doc#ControlFlowIntegrity), a 
'`no_cfi`'
 constant represents a function reference that does not get replaced with a
 reference to the CFI jump table in the `LowerTypeTests` pass. These constants
 may be useful in low-level programs, such as operating system kernels, which
@@ -10023,7 +10023,7 @@ sections.
 
 ## ThinLTO Summary
 
-Compiling with [ThinLTO](https://clang.llvm.org/docs/ThinLTO.html)
+Compiling with [ThinLTO](inv:clang:std:doc#ThinLTO)
 causes the building of a compact summary of the module that is emitted into
 the bitcode. The summary is emitted into the LLVM assembly and identified
 in syntax by a caret ('`^`').
@@ -10258,7 +10258,7 @@ value (e.g., `^1`).
 #### TypeIdInfo
 
 The optional `TypeIdInfo` field, used for
-[Control Flow 
Integrity](https://clang.llvm.org/docs/ControlFlowIntegrity.html),
+[Control Flow Integrity](inv:clang:std:doc#ControlFlowIntegrity),
 looks like:
 
 ```text
@@ -10329,7 +10329,7 @@ Where each ConstVCall has the format described for
 
 Each type id summary entry corresponds to a type identifier resolution
 which is generated during the LTO link portion of the compile when building
-with [Control Flow 
Integrity](https://clang.llvm.org/docs/ControlFlowIntegrity.html),
+with [Control Flow Integrity](inv:clang:std:doc#ControlFlowIntegrity),
 so these are only present in a combined summary index.
 
 Example:
@@ -28235,7 +28235,8 @@ The optimizer is allowed to inline the memory 
assignment when it's profitable to
 
 LLVM provides intrinsics that lower to Objective-C ARC runtime entry points.
 LLVM is aware of the semantics of these functions, and optimizes based on that
-knowledge. You can read more about the details of Objective-C ARC 
[here](https://clang.llvm.org/docs/AutomaticReferenceCounting.html).
+knowledge. You can read more about the details of Objective-C ARC
+[here](inv:clang:std:doc#AutomaticReferenceCounting).
 
 #### '`llvm.objc.autorelease`' Intrinsic
 
@@ -28246,7 +28247,7 @@ declare ptr @llvm.objc.autorelease(ptr)
 
 ##### Lowering:
 
-Lowers to a call to 
[objc_autorelease](https://clang.llvm.org/docs/AutomaticReferenceCounting.html#arc-runtime-objc-autorelease).
+Lowers to a call to 
[objc_autorelease](inv:clang:std:label#arc.runtime.objc_autorelease).
 
 #### '`llvm.objc.autoreleasePoolPop`' Intrinsic
 
@@ -28279,7 +28280,7 @@ declare ptr @llvm.objc.autoreleaseReturnValue(ptr)
 
 ##### Lowering:
 
-Lowers to a call to 
[objc_autoreleaseReturnValue](https://clang.llvm.org/docs/AutomaticReferenceCounting.html#arc-runtime-objc-autoreleasereturnvalue).
+Lowers to a call to 
[objc_autoreleaseReturnValue](inv:clang:std:label#arc.runtime.objc_autoreleasereturnvalue).
 
 #### '`llvm.objc.copyWeak`' Intrinsic
 
@@ -28312,7 +28313,7 @@ declare ptr @llvm.objc.initWeak(ptr, ptr)
 
 ##### Lowering:
 
-Lowers to a call to 
[objc_initWeak](https://clang.llvm.org/docs/AutomaticReferenceCounting.html#arc-runtime-objc-initweak).
+Lowers to a call to 
[objc_initWeak](inv:clang:std:label#arc.runtime.objc_initweak).
 
 #### '`llvm.objc.loadWeak`' Intrinsic
 
@@ -28323,7 +28324,7 @@ declare ptr @llvm.objc.loadWeak(ptr)
 
 ##### Lowering:
 
-Lowers to a call to 
[objc_loadWeak](https://clang.llvm.org/docs/AutomaticReferenceCounting.html#arc-runtime-objc-loadweak).
+Lowers to a call to 
[objc_loadWeak](inv:clang:std:label#arc.runtime.objc_loadweak).
 
 #### '`llvm.objc.loadWeakRetained`' Intrinsic
 
@@ -28334,7 +28335,7 @@ declare ptr @llvm.objc.loadWeakRetained(ptr)
 
 ##### Lowering:
 
-Lowers to a call to 
[objc_loadWeakRetained](https://clang.llvm.org/docs/AutomaticReferenceCounting.html#arc-runtime-objc-loadweakretained).
+Lowers to a call to 
[objc_loadWeakRetained](inv:clang:std:label#arc.runtime.objc_loadweakretained).
 
 #### '`llvm.objc.moveWeak`' Intrinsic
 
@@ -28367,7 +28368,7 @@ declare ptr @llvm.objc.retain(ptr)
 
 ##### Lowering:
 
-Lowers to a call to 
[objc_retain](https://clang.llvm.org/docs/AutomaticReferenceCounting.html#arc-runtime-objc-retain).
+Lowers to a call to [objc_retain](inv:clang:std:label#arc.runtime.objc_retain).
 
 #### '`llvm.objc.retainAutorelease`' Intrinsic
 
@@ -28378,7 +28379,7 @@ declare ptr @llvm.objc.retainAutorelease(ptr)
 
 ##### Lowering:
 
-Lowers to a call to 
[objc_retainAutorelease](https://clang.llvm.org/docs/AutomaticReferenceCounting.html#arc-runtime-objc-retainautorelease).
+Lowers to a call to 
[objc_retainAutorelease](inv:clang:std:label#arc.runtime.objc_retainautorelease).
 
 #### '`llvm.objc.retainAutoreleaseReturnValue`' Intrinsic
 
@@ -28389,7 +28390,7 @@ declare ptr @llvm.objc.retainAutoreleaseReturnValue(ptr)
 
 ##### Lowering:
 
-Lowers to a call to 
[objc_retainAutoreleaseReturnValue](https://clang.llvm.org/docs/AutomaticReferenceCounting.html#arc-runtime-objc-retainautoreleasereturnvalue).
+Lowers to a call to 
[objc_retainAutoreleaseReturnValue](inv:clang:std:label#arc.runtime.objc_retainautoreleasereturnvalue).
 
 #### '`llvm.objc.retainAutoreleasedReturnValue`' Intrinsic
 
@@ -28400,7 +28401,7 @@ declare ptr 
@llvm.objc.retainAutoreleasedReturnValue(ptr)
 
 ##### Lowering:
 
-Lowers to a call to 
[objc_retainAutoreleasedReturnValue](https://clang.llvm.org/docs/AutomaticReferenceCounting.html#arc-runtime-objc-retainautoreleasedreturnvalue).
+Lowers to a call to 
[objc_retainAutoreleasedReturnValue](inv:clang:std:label#arc.runtime.objc_retainautoreleasedreturnvalue).
 
 #### '`llvm.objc.retainBlock`' Intrinsic
 
@@ -28411,7 +28412,7 @@ declare ptr @llvm.objc.retainBlock(ptr)
 
 ##### Lowering:
 
-Lowers to a call to 
[objc_retainBlock](https://clang.llvm.org/docs/AutomaticReferenceCounting.html#arc-runtime-objc-retainblock).
+Lowers to a call to 
[objc_retainBlock](inv:clang:std:label#arc.runtime.objc_retainblock).
 
 #### '`llvm.objc.storeStrong`' Intrinsic
 
@@ -28433,7 +28434,7 @@ declare ptr @llvm.objc.storeWeak(ptr, ptr)
 
 ##### Lowering:
 
-Lowers to a call to 
[objc_storeWeak](https://clang.llvm.org/docs/AutomaticReferenceCounting.html#arc-runtime-objc-storeweak).
+Lowers to a call to 
[objc_storeWeak](inv:clang:std:label#arc.runtime.objc_storeweak).
 
 ### Preserving Debug Information Intrinsics
 
diff --git a/llvm/docs/Lexicon.md b/llvm/docs/Lexicon.md
index 7bd5ffc8b4b2ee..9dfb4e07607365 100644
--- a/llvm/docs/Lexicon.md
+++ b/llvm/docs/Lexicon.md
@@ -97,7 +97,7 @@ This document is a work in progress!
 
 **ento**
 :   This namespace houses the
-    [Clang Static 
Analyzer](https://clang.llvm.org/docs/ClangStaticAnalyzer.html).
+    [Clang Static Analyzer](inv:clang:std:doc#ClangStaticAnalyzer).
     It is an abbreviation of 
[entomology](https://en.wikipedia.org/wiki/Entomology).
 
       *"Entomology is the scientific study of insects."*
diff --git a/llvm/docs/LibFuzzer.md b/llvm/docs/LibFuzzer.md
index 914659fb548b33..17e9749434a865 100644
--- a/llvm/docs/LibFuzzer.md
+++ b/llvm/docs/LibFuzzer.md
@@ -613,7 +613,7 @@ you will want to know whether the function or the corpus 
can be improved further
 One easy to use metric is, of course, code coverage.
 
 We recommend to use
-[Clang Coverage](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html),
+[Clang Coverage](inv:clang:std:doc#SourceBasedCodeCoverage),
 to visualize and study your code coverage
 
([example](https://github.com/google/fuzzer-test-suite/blob/master/tutorial/libFuzzerTutorial.md#visualizing-coverage)).
 
@@ -850,19 +850,18 @@ this may be fixed in future.
 [pcre2]: http://www.pcre.org/
 [AFL]: http://lcamtuf.coredump.cx/afl/
 [Radamsa]: https://github.com/aoh/radamsa
-[SanitizerCoverage]: https://clang.llvm.org/docs/SanitizerCoverage.html
+[SanitizerCoverage]: inv:clang:std:doc#SanitizerCoverage
 [SanitizerCoverageTraceDataFlow]: 
https://clang.llvm.org/docs/SanitizerCoverage.html#tracing-data-flow
-[AddressSanitizer]: https://clang.llvm.org/docs/AddressSanitizer.html
-[LeakSanitizer]: https://clang.llvm.org/docs/LeakSanitizer.html
+[AddressSanitizer]: inv:clang:std:doc#AddressSanitizer
+[LeakSanitizer]: inv:clang:std:doc#LeakSanitizer
 [Heartbleed]: http://en.wikipedia.org/wiki/Heartbleed
 [FuzzerInterface.h]: 
https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/fuzzer/FuzzerInterface.h
 [3.7.0]: https://llvm.org/releases/3.7.0/docs/LibFuzzer.html
 [building Clang from trunk]: https://clang.llvm.org/get_started.html
-[MemorySanitizer]: https://clang.llvm.org/docs/MemorySanitizer.html
-[UndefinedBehaviorSanitizer]: 
https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
+[MemorySanitizer]: inv:clang:std:doc#MemorySanitizer
+[UndefinedBehaviorSanitizer]: inv:clang:std:doc#UndefinedBehaviorSanitizer
 [coverage counters]: 
https://clang.llvm.org/docs/SanitizerCoverage.html#coverage-counters
 [value profile]: #value-profile
 [caller-callee pairs]: 
https://clang.llvm.org/docs/SanitizerCoverage.html#caller-callee-coverage
 [BoringSSL]: https://boringssl.googlesource.com/boringssl/
 [Centipede]: https://github.com/google/centipede
-
diff --git a/llvm/docs/MemTagSanitizer.md b/llvm/docs/MemTagSanitizer.md
index f54bec6188eabc..6ef990997fc09a 100644
--- a/llvm/docs/MemTagSanitizer.md
+++ b/llvm/docs/MemTagSanitizer.md
@@ -85,7 +85,6 @@ Address Tag is returned.
 - [LLVM Developer Meeting 2018 talk on Memory 
Tagging](https://llvm.org/devmtg/2018-10/slides/Serebryany-Stepanov-Tsyrklevich-Memory-Tagging-Slides-LLVM-2018.pdf)
 - [Memory Tagging Whitepaper](https://arxiv.org/pdf/1802.09517.pdf)
 
-[addresssanitizer]: https://clang.llvm.org/docs/AddressSanitizer.html
-[hardwareassistedaddresssanitizer]: 
https://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html
+[addresssanitizer]: inv:clang:std:doc#AddressSanitizer
+[hardwareassistedaddresssanitizer]: 
inv:clang:std:doc#HardwareAssistedAddressSanitizerDesign
 [memory tagging extension]: 
https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/arm-a-profile-architecture-2018-developments-armv85a
-
diff --git a/llvm/docs/PointerAuth.md b/llvm/docs/PointerAuth.md
index aad9f20e6913e4..2a70e14f587ef0 100644
--- a/llvm/docs/PointerAuth.md
+++ b/llvm/docs/PointerAuth.md
@@ -11,7 +11,7 @@ signature checked.  This prevents pointer values of unknown 
origin from being
 used to replace the signed pointer value.
 
 For more details, see the clang documentation page for
-[Pointer 
Authentication](https://clang.llvm.org/docs/PointerAuthentication.html).
+[Pointer Authentication](inv:clang:std:doc#PointerAuthentication).
 
 At the IR level, it is represented using:
 
diff --git a/llvm/docs/Remarks.md b/llvm/docs/Remarks.md
index 6f57e0a689e8d0..d70c9c8c2cd142 100644
--- a/llvm/docs/Remarks.md
+++ b/llvm/docs/Remarks.md
@@ -51,7 +51,7 @@ LLVM: through remark diagnostics, or through serialized 
remarks.
 See also the clang flags
 
[-Rpass](https://clang.llvm.org/docs/UsersManual.html#options-to-emit-optimization-reports)
 and
-[-fsave-optimization-record](http://clang.llvm.org/docs/UsersManual.html#cmdoption-f-no-save-optimization-record).
+[-fsave-optimization-record](inv:clang:std:cmdoption#-f[no-]save-optimization-record).
 
 ### Remark diagnostics
 
diff --git a/llvm/docs/SymbolizerMarkupFormat.md 
b/llvm/docs/SymbolizerMarkupFormat.md
index 45ff11ca58c8ec..1185576f582ad7 100644
--- a/llvm/docs/SymbolizerMarkupFormat.md
+++ b/llvm/docs/SymbolizerMarkupFormat.md
@@ -342,7 +342,7 @@ the external action can then be presented to the user.
   processes.
 
   An example of a type identifier is `sancov`, for dumps from LLVM
-  [SanitizerCoverage](https://clang.llvm.org/docs/SanitizerCoverage.html).
+  [SanitizerCoverage](inv:clang:std:doc#SanitizerCoverage).
 
   Example:
 
diff --git a/llvm/docs/TestSuiteGuide.md b/llvm/docs/TestSuiteGuide.md
index f4780a7d6c8553..8e784bcbf68207 100644
--- a/llvm/docs/TestSuiteGuide.md
+++ b/llvm/docs/TestSuiteGuide.md
@@ -240,7 +240,7 @@ benchmarks. CMake can print a list of them:
 - `TEST_SUITE_FORTRAN`
 
   Activate that Fortran tests. This is a work in progress. More information 
can be
-  found in the [Flang 
documentation](https://flang.llvm.org/docs/FortranLLVMTestSuite.html)
+  found in the [Flang documentation](inv:flang:std:doc#FortranLLVMTestSuite)
 
 - `TEST_SUITE_RUN_UNDER`
 
diff --git a/llvm/docs/TypeMetadata.md b/llvm/docs/TypeMetadata.md
index 7ebd026138313c..42a8a0d2a2c8c8 100644
--- a/llvm/docs/TypeMetadata.md
+++ b/llvm/docs/TypeMetadata.md
@@ -277,6 +277,6 @@ Other parts of the vtable (RTTI, offset-to-top, ...) can 
still be accessed with
 normal loads.
 
 [address point]: 
https://itanium-cxx-abi.github.io/cxx-abi/abi.html#vtable-general
-[control flow integrity]: https://clang.llvm.org/docs/ControlFlowIntegrity.html
-[control flow integrity design document]: 
https://clang.llvm.org/docs/ControlFlowIntegrityDesign.html
+[control flow integrity]: inv:clang:std:doc#ControlFlowIntegrity
+[control flow integrity design document]: 
inv:clang:std:doc#ControlFlowIntegrityDesign
 [globallayoutbuilder]: 
https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Transforms/IPO/LowerTypeTests.h
diff --git a/llvm/docs/conf.py b/llvm/docs/conf.py
index d5c4d21dd755b1..cde77d04a4538e 100644
--- a/llvm/docs/conf.py
+++ b/llvm/docs/conf.py
@@ -259,8 +259,7 @@ def process_rst(name):
 # If true, show URL addresses after external links.
 # man_show_urls = False
 
-# FIXME: Define intersphinx configuration.
-intersphinx_mapping = {}
+intersphinx_mapping = LLVM_INTERSPHINX_MAPPING.copy()
 
 # Pygment lexer are sometimes out of date (when parsing LLVM for example) or
 # wrong. Suppress the warning so the build doesn't abort.

_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to