Daniel Dunbar | 3348e2d | 2010-07-16 00:00:19 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple i386-apple-darwin10 -fblocks -emit-llvm -o - %s | \ |
| 2 | // RUN: FileCheck %s |
| 3 | |
| 4 | // CHECK: @_NSConcreteGlobalBlock = extern_weak global |
| 5 | extern void * _NSConcreteStackBlock[32] __attribute__((weak_import)); |
| 6 | // CHECK: @_NSConcreteStackBlock = extern_weak global |
| 7 | extern void * _NSConcreteGlobalBlock[32] __attribute__((weak_import)); |
Daniel Dunbar | 3348e2d | 2010-07-16 00:00:19 +0000 | [diff] [blame] | 8 | extern void _Block_object_dispose(const void *, const int) __attribute__((weak_import)); |
| 9 | // CHECK: declare extern_weak void @_Block_object_assign |
| 10 | extern void _Block_object_assign(void *, const void *, const int) __attribute__((weak_import)); |
John McCall | a464ff9 | 2010-07-21 06:13:08 +0000 | [diff] [blame] | 11 | // CHECK: declare extern_weak void @_Block_object_dispose |
Daniel Dunbar | 3348e2d | 2010-07-16 00:00:19 +0000 | [diff] [blame] | 12 | |
| 13 | void *x = ^(){}; |
| 14 | |
| 15 | void f1(void (^a0)(void)); |
| 16 | |
| 17 | void f0() { |
| 18 | __block int x; |
| 19 | f1(^(void){ x = 1; }); |
| 20 | } |