2 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
3 // See https://llvm.org/LICENSE.txt for license information.
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
11 void callsomething(const char *format
, int argument
) {
15 dispatch_call_Block_with_release2(void *block
)
17 void (^b
)(void) = (void (^)(void))block
;
22 int main(int argc
, char *argv
[]) {
23 void (^b1
)(void) = ^{ callsomething("argc is %d\n", argc
); };
24 void (^b2
)(void) = ^{ callsomething("hellow world\n", 0); }; // global block now
26 dispatch_call_Block_with_release2(Block_copy(b1
));
27 dispatch_call_Block_with_release2(Block_copy(b2
));
28 printf("%s: Success\n", argv
[0]);