summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/docs/AutomaticReferenceCounting.rst7
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h2
2 files changed, 3 insertions, 6 deletions
diff --git a/clang/docs/AutomaticReferenceCounting.rst b/clang/docs/AutomaticReferenceCounting.rst
index aa2a28399d1..fbd1ba4c4d4 100644
--- a/clang/docs/AutomaticReferenceCounting.rst
+++ b/clang/docs/AutomaticReferenceCounting.rst
@@ -2258,16 +2258,13 @@ non-block type [*]_. Equivalent to the following code:
.. code-block:: objc
- id objc_storeStrong(id *object, id value) {
- value = [value retain];
+ void objc_storeStrong(id *object, id value) {
id oldValue = *object;
+ value = [value retain];
*object = value;
[oldValue release];
- return value;
}
-Always returns ``value``.
-
.. [*] This does not imply that a ``__strong`` object of block type is an
invalid argument to this function. Rather it implies that an ``objc_retain``
and not an ``objc_retainBlock`` operation will be emitted if the argument is
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index 613e300ea09..465d0b4bb5e 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -166,7 +166,7 @@ struct ObjCEntrypoints {
/// void objc_release(id);
llvm::Constant *objc_release;
- /// id objc_storeStrong(id*, id);
+ /// void objc_storeStrong(id*, id);
llvm::Constant *objc_storeStrong;
/// id objc_storeWeak(id*, id);
OpenPOWER on IntegriCloud