1*67e74705SXin Li // Make sure instrumentation data from available_externally functions doesn't
2*67e74705SXin Li // get thrown out and are emitted with the expected linkage.
3*67e74705SXin Li // RUN: %clang_cc1 -O2 -triple x86_64-apple-macosx10.9 -main-file-name c-linkage-available_externally.c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck %s
4*67e74705SXin Li
5*67e74705SXin Li // CHECK: @__profc_foo = linkonce_odr hidden global [1 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
6*67e74705SXin Li // CHECK: @__profd_foo = linkonce_odr hidden global {{.*}} i64* getelementptr inbounds ([1 x i64], [1 x i64]* @__profc_foo, i32 0, i32 0){{.*}}, section "__DATA,__llvm_prf_data", align 8
foo(void)7*67e74705SXin Li inline int foo(void) { return 1; }
8*67e74705SXin Li
main(void)9*67e74705SXin Li int main(void) {
10*67e74705SXin Li return foo();
11*67e74705SXin Li }
12