[Sanitizer] Add rudimentary support for wide-character strings to scanf/printf interc...
[blocksruntime.git] / test / BlocksRuntime / blockimport.c
blob178fce4395e552bb925dcb2a9cd803a166053fed
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
7 /*
8 * blockimport.c
9 * testObjects
11 * Created by Blaine Garst on 10/13/08.
17 // pure C nothing more needed
18 // CONFIG rdar://6289344
20 #include <stdio.h>
21 #include <Block.h>
22 #include <Block_private.h>
27 int main(int argc, char *argv[]) {
28 int i = 1;
29 int (^intblock)(void) = ^{ return i*10; };
31 void (^vv)(void) = ^{
32 if (argc > 0) {
33 printf("intblock returns %d\n", intblock());
37 #if 0
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);
46 #endif
47 void (^vvcopy)(void) = Block_copy(vv);
48 Block_release(vvcopy);
49 printf("%s: success\n", argv[0]);
50 return 0;