Skip to content

Commit d04d2d4

Browse files
committed
[Docs] Update opaque pointers docs (NFC)
Mention automatic enablement of opaque pointers mode that was recently implemented. Update wording in the transition state, because it seems like my overly cautious wording has given some people an incorrect impression of the state of opaque pointer support in clang.
1 parent d41d798 commit d04d2d4

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

llvm/docs/OpaquePointers.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ During the transition phase, LLVM can be used in two modes: In typed pointer
6565
mode (currently still the default) all pointer types have a pointee type and
6666
opaque pointers cannot be used. In opaque pointers mode, all pointers are
6767
opaque. The opaque pointer mode can be enabled using ``-opaque-pointers`` in
68-
LLVM tools like ``opt``, or ``-mllvm -opaque-pointers`` in clang.
68+
LLVM tools like ``opt``, or ``-mllvm -opaque-pointers`` in clang. Additionally,
69+
opaque pointer mode is automatically enabled for IR files that use the ``ptr``
70+
type.
6971

7072
In opaque pointer mode, all typed pointers used in IR, bitcode, or created
7173
using ``PointerType::get()`` and similar APIs are automatically converted into
@@ -194,12 +196,11 @@ Transition State
194196

195197
As of March 2022 most parts of LLVM support opaque pointers. It is possible
196198
to build most C and C++ code in opaque pointer mode, both with and without
197-
optimization, and produce working binaries. However, thes are still some major
199+
optimization, and produce working binaries. However, thes are still some
198200
open problems:
199201

200-
* While clang has limited support for opaque pointers (sufficient to compile
201-
most C/C++ code on Linux), a major effort will be needed to systematically
202-
remove all uses of ``getPointerElementType()`` and the deprecated
202+
* While clang mostly supports opaque pointers, additional effort will be
203+
needed to systematically remove all uses of the deprecated
203204
``Address::deprecated()`` constructor.
204205

205206
* We do not yet have a firm strategy for enabling opaque pointers. A large

0 commit comments

Comments
 (0)