]> granicus.if.org Git - clang/commitdiff
docs: update docs for objc_storeStrong behaviour
authorSaleem Abdulrasool <compnerd@compnerd.org>
Sat, 11 Feb 2017 17:24:09 +0000 (17:24 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Sat, 11 Feb 2017 17:24:09 +0000 (17:24 +0000)
objc_storeStrong does not return a value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294855 91177308-0d34-0410-b5e6-96231b3b80d8

docs/AutomaticReferenceCounting.rst
lib/CodeGen/CodeGenModule.h

index aa2a28399d14907c2d663c619fed446cc9ff5d4f..fbd1ba4c4d47b666e4e29350e572c4a254eada2c 100644 (file)
@@ -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
index 613e300ea091bcb18bbe74e830082d3a3ac3f573..465d0b4bb5e78908a2f88fb993ed805757b0065f 100644 (file)
@@ -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);