[Docs] Update default in opaque pointer docs (NFC)

Also mention a relevant C API.
This commit is contained in:
Nikita Popov 2022-06-02 12:28:12 +02:00
parent 1fe4953d89
commit b0ce6a0ae5
1 changed files with 9 additions and 6 deletions

View File

@ -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
================