From 9a9d7c93c3f1e336f821e08a10bf3305c0bcdbd2 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290390 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/Block-ABI-Apple.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Block-ABI-Apple.rst b/docs/Block-ABI-Apple.rst index 08f346447e..628e6f3d90 100644 --- a/docs/Block-ABI-Apple.rst +++ b/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.40.0