r294855 - docs: update docs for objc_storeStrong behaviour

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 11 09:24:09 PST 2017


Author: compnerd
Date: Sat Feb 11 11:24:09 2017
New Revision: 294855

URL: http://llvm.org/viewvc/llvm-project?rev=294855&view=rev
Log:
docs: update docs for objc_storeStrong behaviour

objc_storeStrong does not return a value.

Modified:
    cfe/trunk/docs/AutomaticReferenceCounting.rst
    cfe/trunk/lib/CodeGen/CodeGenModule.h

Modified: cfe/trunk/docs/AutomaticReferenceCounting.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/AutomaticReferenceCounting.rst?rev=294855&r1=294854&r2=294855&view=diff
==============================================================================
--- cfe/trunk/docs/AutomaticReferenceCounting.rst (original)
+++ cfe/trunk/docs/AutomaticReferenceCounting.rst Sat Feb 11 11:24:09 2017
@@ -2258,16 +2258,13 @@ non-block type [*]_.  Equivalent to the
 
 .. 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

Modified: cfe/trunk/lib/CodeGen/CodeGenModule.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.h?rev=294855&r1=294854&r2=294855&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.h Sat Feb 11 11:24:09 2017
@@ -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);




More information about the cfe-commits mailing list