aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/func-in-block.c
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-06-28 18:58:34 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-06-28 18:58:34 +0000
commit16ac5ce5fd7d9b4dd67ca8d57403c8f45e3dcf2d (patch)
tree9bd2459af767c802fcd6fcb55ffd4a17293f9930 /test/CodeGen/func-in-block.c
parentce88d0f015344255d6367914374629fbadb99b94 (diff)
Have __func__ and siblings point to block's implementation function
name. Fixes radar 7860965. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107044 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/func-in-block.c')
-rw-r--r--test/CodeGen/func-in-block.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/func-in-block.c b/test/CodeGen/func-in-block.c
new file mode 100644
index 0000000000..27e0c09609
--- /dev/null
+++ b/test/CodeGen/func-in-block.c
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fblocks -emit-llvm -o - %s | FileCheck %s
+// rdar: // 7860965
+
+extern void PRINTF(const char *);
+extern void B(void (^)(void));
+
+int main()
+{
+ PRINTF(__func__);
+ B(
+ ^{
+ PRINTF(__func__);
+ }
+ );
+ return 0; // not reached
+}
+
+// CHECK: call void @PRINTF({{.*}}@__func__.__main_block_invoke_