[llvm] b0ce6a0 - [Docs] Update default in opaque pointer docs (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 2 03:29:14 PDT 2022
Author: Nikita Popov
Date: 2022-06-02T12:29:07+02:00
New Revision: b0ce6a0ae5e34af704f7c6f3811399b5f40f8188
URL: https://github.com/llvm/llvm-project/commit/b0ce6a0ae5e34af704f7c6f3811399b5f40f8188
DIFF: https://github.com/llvm/llvm-project/commit/b0ce6a0ae5e34af704f7c6f3811399b5f40f8188.diff
LOG: [Docs] Update default in opaque pointer docs (NFC)
Also mention a relevant C API.
Added:
Modified:
llvm/docs/OpaquePointers.rst
Removed:
################################################################################
diff --git a/llvm/docs/OpaquePointers.rst b/llvm/docs/OpaquePointers.rst
index a576c1325b91..f4a99fc100cc 100644
--- a/llvm/docs/OpaquePointers.rst
+++ b/llvm/docs/OpaquePointers.rst
@@ -62,12 +62,12 @@ Opaque Pointers Mode
====================
During the transition phase, LLVM can be used in two modes: In typed pointer
-mode (currently still the default) all pointer types have a pointee type and
-opaque pointers cannot be used. In opaque pointers mode, all pointers are
-opaque. The opaque pointer mode can be enabled using ``-opaque-pointers`` in
-LLVM tools like ``opt``, or ``-Xclang -opaque-pointers`` in clang. Additionally,
-opaque pointer mode is automatically enabled for IR and bitcode files that use
-the ``ptr`` type.
+mode all pointer types have a pointee type and opaque pointers cannot be used.
+In opaque pointers mode (the default), all pointers are opaque. The opaque
+pointer mode can be disabled using ``-opaque-pointers=0`` in
+LLVM tools like ``opt``, or ``-Xclang -no-opaque-pointers`` in clang.
+Additionally, opaque pointer mode is automatically disabled for IR and bitcode
+files that explicitly mention ``i8*`` style typed pointers.
In opaque pointer mode, all typed pointers used in IR, bitcode, or created
using ``PointerType::get()`` and similar APIs are automatically converted into
@@ -191,6 +191,9 @@ opaque pointer transition::
Additionally, it will no longer be possible to call ``LLVMGetElementType()``
on a pointer type.
+It is possible to control whether opaque pointers are used (if you want to
+override the default) using the ``LLVMContextSetOpaquePointers()`` API.
+
Transition State
================
More information about the llvm-commits
mailing list