teak-llvm/clang/test/CodeGen/block-decl-merging.c
John McCall a464ff9d15 Switch some random local-decl cleanups over to using lazy cleanups. Turn on
the block-release unwind cleanup:  we're never going to test it if we don't turn
it on.

llvm-svn: 108992
2010-07-21 06:13:08 +00:00

21 lines
756 B
C

// RUN: %clang_cc1 -triple i386-apple-darwin10 -fblocks -emit-llvm -o - %s | \
// RUN: FileCheck %s
// CHECK: @_NSConcreteGlobalBlock = extern_weak global
extern void * _NSConcreteStackBlock[32] __attribute__((weak_import));
// CHECK: @_NSConcreteStackBlock = extern_weak global
extern void * _NSConcreteGlobalBlock[32] __attribute__((weak_import));
extern void _Block_object_dispose(const void *, const int) __attribute__((weak_import));
// CHECK: declare extern_weak void @_Block_object_assign
extern void _Block_object_assign(void *, const void *, const int) __attribute__((weak_import));
// CHECK: declare extern_weak void @_Block_object_dispose
void *x = ^(){};
void f1(void (^a0)(void));
void f0() {
__block int x;
f1(^(void){ x = 1; });
}