summaryrefslogtreecommitdiff
path: root/test/CodeGen/func-in-block.c
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-07-13 17:21:42 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-07-13 17:21:42 +0000
commit4ba675006b5a8edfc48b6a9bd3dcf54a70cc08f2 (patch)
tree48b44512b5db8ced345df4a1a56b5065cf2a14d9 /test/CodeGen/func-in-block.c
parentd7279c4c177bca357ef96ff1379fd9bc420bfe83 (diff)
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 000000000000..27e0c0960997
--- /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_