1 // RUN: %clang_cc1 %s -triple x86_64-linux -emit-llvm -fblocks -o - | FileCheck %s
4 // These will be inlined by the optimizers provided the block descriptors
5 // and block literals are internal constants.
6 // CHECK: @__block_descriptor_tmp = internal constant
7 // CHECK: @__block_literal_global = internal constant
8 // CHECK: @__block_descriptor_tmp.2 = internal constant
9 // CHECK: @__block_literal_global.3 = internal constant
10 static int fun(int x
) {
14 static int block(int x
) {
15 return (^(int x
){return x
+1;})(x
);
18 extern int printf(const char *, ...);
19 static void print(int result
) {
20 printf("%d\n", result
);
23 int main (int argc
, const char * argv
[]) {
27 int (^block_inline
)(int) = ^(int x
){return x
+1;};
28 print(block_inline(x
));