teak-llvm/clang/test/CodeGen/block-with-perdefinedexpr.c
Fariborz Jahanian 68e7938361 This patch fixes couple of bugs for predefined expression
used inside blocks. It fixes a crash in naming code
for __func__ etc. when used in a block declared globally.
It also brings back old naming convention for
predefined expression which was broken. rdar://18961148

llvm-svn: 222065
2014-11-14 23:55:27 +00:00

15 lines
447 B
C

// RUN: %clang_cc1 %s -emit-llvm -o - -fblocks -triple x86_64-apple-darwin10 | FileCheck %s
// rdar://18961148
void syslog(const char *, ...);
void handler( );
static void (^spd)() = ^()
{
handler( ^(){ syslog("%s", __FUNCTION__); } );
};
// CHECK: @__FUNCTION__.spd_block_invoke_2 = private unnamed_addr constant [19 x i8] c"spd_block_invoke_2\00"
// CHECK: define internal void @spd_block_invoke_2
// CHECK: @__FUNCTION__.spd_block_invoke_2