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 10/13/08.
17 // pure C nothing more needed
18 // CONFIG rdar://6289344
22 #include <Block_private.h>
27 int main(int argc
, char *argv
[]) {
29 int (^intblock
)(void) = ^{ return i
*10; };
33 printf("intblock returns %d\n", intblock());
38 //printf("Block dump %s\n", _Block_dump(vv));
40 struct Block_layout
*layout
= (struct Block_layout
*)(void *)vv
;
41 printf("isa %p\n", layout
->isa
);
42 printf("flags %x\n", layout
->flags
);
43 printf("descriptor %p\n", layout
->descriptor
);
44 printf("descriptor->size %d\n", layout
->descriptor
->size
);
47 void (^vvcopy
)(void) = Block_copy(vv
);
48 Block_release(vvcopy
);
49 printf("%s: success\n", argv
[0]);