Browse Source

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
Saleem Abdulrasool 8 years ago
parent
commit
21c324f4db
2 changed files with 3 additions and 6 deletions
  1. 2 5
      docs/AutomaticReferenceCounting.rst
  2. 1 1
      lib/CodeGen/CodeGenModule.h

+ 2 - 5
docs/AutomaticReferenceCounting.rst

@@ -2258,16 +2258,13 @@ non-block type [*]_.  Equivalent to the following code:
 
 
 .. code-block:: objc
 .. code-block:: objc
 
 
-  id objc_storeStrong(id *object, id value) {
-    value = [value retain];
+  void objc_storeStrong(id *object, id value) {
     id oldValue = *object;
     id oldValue = *object;
+    value = [value retain];
     *object = value;
     *object = value;
     [oldValue release];
     [oldValue release];
-    return value;
   }
   }
 
 
-Always returns ``value``.
-
 .. [*] This does not imply that a ``__strong`` object of block type is an
 .. [*] 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``
    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
    and not an ``objc_retainBlock`` operation will be emitted if the argument is

+ 1 - 1
lib/CodeGen/CodeGenModule.h

@@ -166,7 +166,7 @@ struct ObjCEntrypoints {
   /// void objc_release(id);
   /// void objc_release(id);
   llvm::Constant *objc_release;
   llvm::Constant *objc_release;
 
 
-  /// id objc_storeStrong(id*, id);
+  /// void objc_storeStrong(id*, id);
   llvm::Constant *objc_storeStrong;
   llvm::Constant *objc_storeStrong;
 
 
   /// id objc_storeWeak(id*, id);
   /// id objc_storeWeak(id*, id);