[llvm] [docs] Reorder metadata examples in note (PR #136859)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 23 05:53:25 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-ir

Author: None (amordo)

<details>
<summary>Changes</summary>

before
![image](https://github.com/user-attachments/assets/3305744c-3437-42f7-9719-79236ffd0533)

after
![image](https://github.com/user-attachments/assets/6a9a752b-150c-459c-b3ac-4abb20c5789a)


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


1 Files Affected:

- (modified) llvm/docs/LangRef.rst (+6-6) 


``````````diff
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 110c30e19220f..a4d00a2ba0ce7 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -6019,23 +6019,23 @@ type:
 
         call void @llvm.foo(metadata i32 1)
 
-    Whereas the first argument to this call is a ``MetadataAsValue(MDNode)``:
+    And the first element of this ``MDTuple`` is a ``ValueAsMetadata(Value)``:
 
     .. code-block:: llvm
 
-        call void @llvm.foo(metadata !0)
+        !{i32 1}
 
-    The first element of this ``MDTuple`` is a ``MDNode``:
+    Whereas the first argument to this call is a ``MetadataAsValue(MDNode)``:
 
     .. code-block:: llvm
 
-        !{!0}
+        call void @llvm.foo(metadata !0)
 
-    And the first element of this ``MDTuple`` is a ``ValueAsMetadata(Value)``:
+    The first element of this ``MDTuple`` is a ``MDNode``:
 
     .. code-block:: llvm
 
-        !{i32 1}
+        !{!0}
 
 .. _metadata-string:
 

``````````

</details>


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


More information about the llvm-commits mailing list