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
10 * Created by Blaine Garst on 12/1/08.
18 // Created by Blaine Garst on 5/13/08.
21 // Tests copying of blocks with byref ints
22 // CONFIG rdar://6414583 -C99
27 #include <Block_private.h>
32 typedef void (^voidVoid
)(void);
36 void callVoidVoid(voidVoid closure
) {
41 voidVoid
testRoutine(const char *whoami
) {
42 __block
int dumbo
= strlen(whoami
);
44 //printf("incring dumbo from %d\n", dumbo);
49 voidVoid copy
= Block_copy(dummy
);
55 int main(int argc
, char *argv
[]) {
57 for (int i
= 0; i
< 100; ++i
) {
58 array
[i
] = testRoutine(argv
[0]);
61 for (int i
= 0; i
< 100; ++i
) {
62 Block_release(array
[i
]);
66 printf("%s: success\n", argv
[0]);