[llvm] dce3b40 - [Docs] Use correct rst syntax

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 17 05:08:57 PST 2022


Author: Nikita Popov
Date: 2022-02-17T14:08:46+01:00
New Revision: dce3b403a7806fb839986f9f46975fb2c7251d42

URL: https://github.com/llvm/llvm-project/commit/dce3b403a7806fb839986f9f46975fb2c7251d42
DIFF: https://github.com/llvm/llvm-project/commit/dce3b403a7806fb839986f9f46975fb2c7251d42.diff

LOG: [Docs] Use correct rst syntax

Added: 
    

Modified: 
    llvm/docs/OpaquePointers.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/OpaquePointers.rst b/llvm/docs/OpaquePointers.rst
index ed8fd5b1e32d..470a9347e3fa 100644
--- a/llvm/docs/OpaquePointers.rst
+++ b/llvm/docs/OpaquePointers.rst
@@ -100,35 +100,35 @@ instructions instead of querying the pointer type.
 
 Here are some common ways to avoid pointer element type accesses:
 
-* For loads, use ''getType()''.
-* For stores, use ''getValueOperand()->getType()''.
-* Use ''getLoadStoreType()'' to handle both of the above in one call.
-* For getelementptr instructions, use ''getSourceElementType()''.
-* For calls, use ''getFunctionType()''.
-* For allocas, use ''getAllocatedType()''.
-* For globals, use ''getValueType()''.
+* For loads, use ``getType()``.
+* For stores, use ``getValueOperand()->getType()``.
+* Use ``getLoadStoreType()`` to handle both of the above in one call.
+* For getelementptr instructions, use ``getSourceElementType()``.
+* For calls, use ``getFunctionType()``.
+* For allocas, use ``getAllocatedType()``.
+* For globals, use ``getValueType()``.
 * For consistency assertions, use
-  ''PointerType::isOpaqueOrPointeeTypeEquals()''.
+  ``PointerType::isOpaqueOrPointeeTypeEquals()``.
 * To create a pointer type in a 
diff erent address space, use
-  ''PointerType::getWithSamePointeeType()''.
+  ``PointerType::getWithSamePointeeType()``.
 * To check that two pointers have the same element type, use
-  ''PointerType::hasSameElementTypeAs()''.
+  ``PointerType::hasSameElementTypeAs()``.
 * While it is preferred to write code in a way that accepts both typed and
-  opaque pointers, ''Type::isOpaquePointerTy()'' and
-  ''PointerType::isOpaque()'' can be used to handle opaque pointers specially.
-  ''PointerType::getNonOpaquePointerElementType()'' can be used as a marker in
+  opaque pointers, ``Type::isOpaquePointerTy()`` and
+  ``PointerType::isOpaque()`` can be used to handle opaque pointers specially.
+  ``PointerType::getNonOpaquePointerElementType()`` can be used as a marker in
   code-paths where opaque pointers have been explicitly excluded.
-* To get the type of a byval argument, use ''getParamByValType()''. Similar
+* To get the type of a byval argument, use ``getParamByValType()``. Similar
   method exists for other ABI-affecting attributes that need to know the
   element type, such as byref, sret, inalloca and preallocated.
-* Some intrinsics require an ''elementtype'' attribute, which can be retrieved
-  using ''getParamElementType()''. This attribute is required in cases where
+* Some intrinsics require an ``elementtype`` attribute, which can be retrieved
+  using ``getParamElementType()``. This attribute is required in cases where
   the intrinsic does not naturally encode a needed element type. This is also
   used for inline assembly.
 
 Note that some of the methods mentioned above only exist to support both typed
 and opaque pointers at the same time, and will be dropped once the migration
-has completed. For example, ''isOpaqueOrPointeeTypeEquals()'' becomes
+has completed. For example, ``isOpaqueOrPointeeTypeEquals()`` becomes
 meaningless once all pointers are opaque.
 
 While direct usage of pointer element types is immediately apparent in code,


        


More information about the llvm-commits mailing list