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

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


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

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)


>From a310ee9a5ddc2e2d088f76180051dda3d6a783fe Mon Sep 17 00:00:00 2001
From: Alexander Mordovskiy <iammorjj at gmail.com>
Date: Wed, 23 Apr 2025 14:47:49 +0200
Subject: [PATCH] [docs] Reorder metadata examples in note

---
 llvm/docs/LangRef.rst | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

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:
 



More information about the llvm-commits mailing list