Skip to content

Commit 21c324f

Browse files
committed
docs: update docs for objc_storeStrong behaviour
objc_storeStrong does not return a value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294855 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 370ec93 commit 21c324f

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

docs/AutomaticReferenceCounting.rst

+2-5
Original file line numberDiff line numberDiff line change
@@ -2258,16 +2258,13 @@ non-block type [*]_. Equivalent to the following code:
22582258
22592259
.. code-block:: objc
22602260
2261-
id objc_storeStrong(id *object, id value) {
2262-
value = [value retain];
2261+
void objc_storeStrong(id *object, id value) {
22632262
id oldValue = *object;
2263+
value = [value retain];
22642264
*object = value;
22652265
[oldValue release];
2266-
return value;
22672266
}
22682267
2269-
Always returns ``value``.
2270-
22712268
.. [*] This does not imply that a ``__strong`` object of block type is an
22722269
invalid argument to this function. Rather it implies that an ``objc_retain``
22732270
and not an ``objc_retainBlock`` operation will be emitted if the argument is

lib/CodeGen/CodeGenModule.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ struct ObjCEntrypoints {
166166
/// void objc_release(id);
167167
llvm::Constant *objc_release;
168168

169-
/// id objc_storeStrong(id*, id);
169+
/// void objc_storeStrong(id*, id);
170170
llvm::Constant *objc_storeStrong;
171171

172172
/// id objc_storeWeak(id*, id);

0 commit comments

Comments
 (0)