Fix example: byref struct's init was incorrect, and the block literal's holder should...
authorJonathan Roelofs <jonathan@codesourcery.com>
Thu, 22 Dec 2016 23:48:23 +0000 (23:48 +0000)
committerJonathan Roelofs <jonathan@codesourcery.com>
Thu, 22 Dec 2016 23:48:23 +0000 (23:48 +0000)
llvm-svn: 290390

clang/docs/Block-ABI-Apple.rst

index 08f3464..628e6f3 100644 (file)
@@ -530,13 +530,13 @@ and:
 
 .. code-block:: c
 
-    struct _block_byref_i i = {( .forwarding=&i, .flags=0, .size=sizeof(struct _block_byref_i) )};
+    struct _block_byref_i i = {( .isa=NULL, .forwarding=&i, .flags=0, .size=sizeof(struct _block_byref_i), .captured_i=2 )};
     struct __block_literal_5 _block_literal = {
           &_NSConcreteStackBlock,
           (1<<25)|(1<<29), <uninitialized>,
           __block_invoke_5,
           &__block_descriptor_5,
-          2,
+          &i,
     };
 
 Importing ``__attribute__((NSObject))`` ``__block`` variables