2 // The LLVM Compiler Infrastructure
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
12 void callsomething(const char *format
, int argument
) {
16 dispatch_call_Block_with_release2(void *block
)
18 void (^b
)(void) = (void (^)(void))block
;
23 int main(int argc
, char *argv
[]) {
24 void (^b1
)(void) = ^{ callsomething("argc is %d\n", argc
); };
25 void (^b2
)(void) = ^{ callsomething("hellow world\n", 0); }; // global block now
27 dispatch_call_Block_with_release2(Block_copy(b1
));
28 dispatch_call_Block_with_release2(Block_copy(b2
));
29 printf("%s: Success\n", argv
[0]);