[docs] Fix build-docs.sh
[llvm-project.git] / compiler-rt / test / BlocksRuntime / hasdescriptor.c
blob445b5f4622110386a3eb29b8ba2d88949d4a597b
1 //
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
8 // CONFIG C
10 #include <stdio.h>
11 #include <Block_private.h>
14 int main(int argc, char *argv[]) {
15 void (^inner)(void) = ^ { printf("argc was %d\n", argc); };
16 void (^outer)(void) = ^{
17 inner();
18 inner();
20 //printf("size of inner is %ld\n", Block_size(inner));
21 //printf("size of outer is %ld\n", Block_size(outer));
22 if (Block_size(inner) != Block_size(outer)) {
23 printf("not the same size, using old compiler??\n");
24 return 1;
26 printf("%s: Success\n", argv[0]);
27 return 0;