xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/block-with-perdefinedexpr.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -o - -fblocks -triple x86_64-apple-darwin10 | FileCheck %s
2*0a6a1f1dSLionel Sambuc // rdar://18961148
3*0a6a1f1dSLionel Sambuc 
4*0a6a1f1dSLionel Sambuc void syslog(const char *, ...);
5*0a6a1f1dSLionel Sambuc 
6*0a6a1f1dSLionel Sambuc void handler( );
7*0a6a1f1dSLionel Sambuc 
8*0a6a1f1dSLionel Sambuc static void (^spd)() = ^()
9*0a6a1f1dSLionel Sambuc {
10*0a6a1f1dSLionel Sambuc  handler( ^(){ syslog("%s", __FUNCTION__); } );
11*0a6a1f1dSLionel Sambuc };
12*0a6a1f1dSLionel Sambuc // CHECK: @__FUNCTION__.spd_block_invoke_2 = private unnamed_addr constant [19 x i8] c"spd_block_invoke_2\00"
13*0a6a1f1dSLionel Sambuc // CHECK: define internal void @spd_block_invoke_2
14*0a6a1f1dSLionel Sambuc // CHECK: @__FUNCTION__.spd_block_invoke_2
15