2 // The LLVM Compiler Infrastructure
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
11 // Created by Blaine Garst on 5/13/08.
16 #include <Block_private.h>
20 void callVoidVoid(void (^closure
)(void)) {
24 int main(int argc
, char *argv
[]) {
27 void (^block
)(void) = ^{ ++i
; };
28 //printf("original (old style) is %s\n", _Block_dump_old(block));
29 //printf("original (new style) is %s\n", _Block_dump(block));
30 void (^blockcopy
)(void) = Block_copy(block
);
31 //printf("copy is %s\n", _Block_dump(blockcopy));
32 // use a copy & see that it updates i
36 printf("*** %s didn't update i\n", argv
[0]);
39 printf("%s: success\n", argv
[0]);