summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/block-with-perdefinedexpr.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/block-with-perdefinedexpr.c')
-rw-r--r--test/CodeGen/block-with-perdefinedexpr.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/block-with-perdefinedexpr.c b/test/CodeGen/block-with-perdefinedexpr.c
new file mode 100644
index 0000000..68fdea6
--- /dev/null
+++ b/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
OpenPOWER on IntegriCloud