[llvm] [LangRef] Fix `ptrtoaddr` code block (PR #152927)

via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 10 09:31:14 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-ir

Author: Pedro Lobo (pedroclobo)

<details>
<summary>Changes</summary>

Fixes formatting of the example code block under the `ptrtoaddr` instruction.

---
Full diff: https://github.com/llvm/llvm-project/pull/152927.diff


1 Files Affected:

- (modified) llvm/docs/LangRef.rst (+3-2) 


``````````diff
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 99a0b179b7c0c..6ba3759080cc3 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -12571,10 +12571,11 @@ Example:
 """"""""
 This example assumes pointers in address space 1 are 64 bits in size with an
 address width of 32 bits (``p1:64:64:64:32`` :ref:`datalayout string<langref_datalayout>`)
+
 .. code-block:: llvm
 
-      %X = ptrtoaddr ptr addrspace(1) %P to i32  ; extracts low 32 bits of pointer
-      %Y = ptrtoaddr <4 x ptr addrspace(1)> %P to <4 x i32>; yields vector of low 32 bits for each pointer
+      %X = ptrtoaddr ptr addrspace(1) %P to i32              ; extracts low 32 bits of pointer
+      %Y = ptrtoaddr <4 x ptr addrspace(1)> %P to <4 x i32>  ; yields vector of low 32 bits for each pointer
 
 
 .. _i_inttoptr:

``````````

</details>


https://github.com/llvm/llvm-project/pull/152927


More information about the llvm-commits mailing list