blocks.c revision 0e4f40e1bbc4dce16bbb9870300a435419f1b3d5
1// RUN: clang-cc -triple i386-unknown-unknown %s -emit-llvm -o %t -fblocks && 2void (^f)(void) = ^{}; 3 4// rdar://6768379 5int f0(int (^a0)()) { 6 return a0(1, 2, 3); 7} 8 9// Verify that attributes on blocks are set correctly. 10typedef struct s0 T; 11struct s0 { 12 int a[64]; 13}; 14 15// RUN: grep 'internal void @__f2_block_invoke_(.struct.s0\* noalias sret .*, .*, .* byval .*)' %t && 16struct s0 f2(struct s0 a0) { 17 return ^(struct s0 a1){ return a1; }(a0); 18} 19 20// RUN: true 21