diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-11-14 23:55:27 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-11-14 23:55:27 +0000 |
commit | 68e79383619e354988deac99d7c6ac6a75e92b33 (patch) | |
tree | 4009033a511ad0160c23a5a2d4df8ec5afea0ab9 /clang/test/CodeGen/block-with-perdefinedexpr.c | |
parent | c81307af0f07121f9e9f142078c04aeaae8c5eee (diff) | |
download | bcm5719-llvm-68e79383619e354988deac99d7c6ac6a75e92b33.tar.gz bcm5719-llvm-68e79383619e354988deac99d7c6ac6a75e92b33.zip |
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
Diffstat (limited to 'clang/test/CodeGen/block-with-perdefinedexpr.c')
-rw-r--r-- | clang/test/CodeGen/block-with-perdefinedexpr.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/CodeGen/block-with-perdefinedexpr.c b/clang/test/CodeGen/block-with-perdefinedexpr.c new file mode 100644 index 00000000000..68fdea60f37 --- /dev/null +++ b/clang/test/CodeGen/block-with-perdefinedexpr.c @@ -0,0 +1,14 @@ +// 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 |