[llvm] 5ab077f - [LangRef] Update opaque pointers status (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 22 05:47:38 PDT 2022


Author: Nikita Popov
Date: 2022-07-22T14:47:31+02:00
New Revision: 5ab077f911ced8f9ab53fcfcc40b254fd1ca7edd

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

LOG: [LangRef] Update opaque pointers status (NFC)

Opaque pointers support is complete and default. Specify ptr as
the normal pointer type and i8* as something supported under
non-default options.

A larger update of examples in LangRef is still needed.

Added: 
    

Modified: 
    llvm/docs/LangRef.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 9464b20619ab..55eabc39eb7e 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -3565,44 +3565,19 @@ Pointer Type
 
 :Overview:
 
-The pointer type is used to specify memory locations. Pointers are
+The pointer type ``ptr`` is used to specify memory locations. Pointers are
 commonly used to reference objects in memory.
 
 Pointer types may have an optional address space attribute defining the
 numbered address space where the pointed-to object resides. The default
 address space is number zero. The semantics of non-zero address spaces
-are target-specific.
+are target-specific. For example, ``ptr addrspace(5)`` is a pointer
+to address space 5.
 
-Note that LLVM does not permit pointers to void (``void*``) nor does it
-permit pointers to labels (``label*``). Use ``i8*`` instead.
-
-LLVM is in the process of transitioning to
-`opaque pointers <OpaquePointers.html#opaque-pointers>`_.
-Opaque pointers do not have a pointee type. Rather, instructions
-interacting through pointers specify the type of the underlying memory
-they are interacting with. Opaque pointers are still in the process of
-being worked on and are not complete.
-
-:Syntax:
-
-::
-
-      <type> *
-      ptr
-
-:Examples:
-
-+-------------------------+--------------------------------------------------------------------------------------------------------------+
-| ``[4 x i32]*``          | A :ref:`pointer <t_pointer>` to :ref:`array <t_array>` of four ``i32`` values.                               |
-+-------------------------+--------------------------------------------------------------------------------------------------------------+
-| ``i32 (i32*) *``        | A :ref:`pointer <t_pointer>` to a :ref:`function <t_function>` that takes an ``i32*``, returning an ``i32``. |
-+-------------------------+--------------------------------------------------------------------------------------------------------------+
-| ``i32 addrspace(5)*``   | A :ref:`pointer <t_pointer>` to an ``i32`` value that resides in address space 5.                            |
-+-------------------------+--------------------------------------------------------------------------------------------------------------+
-| ``ptr``                 | An opaque pointer type to a value that resides in address space 0.                                           |
-+-------------------------+--------------------------------------------------------------------------------------------------------------+
-| ``ptr addrspace(5)``    | An opaque pointer type to a value that resides in address space 5.                                           |
-+-------------------------+--------------------------------------------------------------------------------------------------------------+
+Prior to LLVM 15, pointer types also specified a pointee type, such as
+``i8*``, ``[4 x i32]*`` or ``i32 (i32*)*``. In LLVM 15, such "typed
+pointers" are still supported under non-default options. See the
+`opaque pointers document <OpaquePointers.html>`__ for more information.
 
 .. _t_vector:
 


        


More information about the llvm-commits mailing list