| // RUN: %clang_cc1 -emit-llvm -fblocks -o - -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 %s | FileCheck %s |
| // CHECK-DAG: @_ZZZN26externally_visible_statics1S3fooEiEd_Ub_E1k = linkonce_odr global i32 0 |
| // CHECK-DAG: @_ZZZN26externally_visible_statics10inlinefuncEvEUb_E1i = linkonce_odr global i32 0 |
| // CHECK-DAG: @_ZZZN26externally_visible_statics10inlinefuncEvEUb0_E1j = linkonce_odr global i32 0 |
| // CHECK-DAG: @_ZZ26externally_visible_statics1S1xMUb_E1j = linkonce_odr global i32 0 |
| // CHECK-LABEL: define internal i32 @___Z3foov_block_invoke |
| // CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZZ3foovEUb_E5value |
| // CHECK-LABEL: define internal i32 @i_block_invoke |
| int i = ^(int x) { return x;}(i); |
| // CHECK: define internal signext i8 @"__11-[A method]_block_invoke" |
| // CHECK: @"_ZZZ11-[A method]EUb1_E4name" |
| static const char *name = "hello"; |
| static const char *name = "hello"; |
| // CHECK-LABEL: define internal signext i8 @___Z3fooi_block_invoke |
| // CHECK: @_ZZZN1N3barEvEUb3_E4name |
| static const char *name = "hello"; |
| // CHECK: @_ZZZN1CC1EvEUb4_E5nameb |
| static const char *nameb = "hello"; |
| namespace externally_visible_statics { |
| inline void inlinefunc() { |
| void foo(int y = ^{ static int k = f(); return k; }()) {} |