From 7b8a91434af55efa0d36e6c295190a8149b87159 Mon Sep 17 00:00:00 2001 From: Jonathan Roelofs Date: Thu, 22 Dec 2016 23:48:23 +0000 Subject: [PATCH] Fix example: byref struct's init was incorrect, and the block literal's holder should point to it. llvm-svn: 290390 --- clang/docs/Block-ABI-Apple.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/docs/Block-ABI-Apple.rst b/clang/docs/Block-ABI-Apple.rst index 08f3464..628e6f3 100644 --- a/clang/docs/Block-ABI-Apple.rst +++ b/clang/docs/Block-ABI-Apple.rst @@ -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), , __block_invoke_5, &__block_descriptor_5, - 2, + &i, }; Importing ``__attribute__((NSObject))`` ``__block`` variables -- 2.7.4