[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Profile / c-linkage-available_externally.c
blob9a35d067460e1f911f394c1f4ad68b48558172af
1 // Make sure instrumentation data from available_externally functions doesn't
2 // get thrown out and are emitted with the expected linkage.
3 // RUN: %clang_cc1 -no-opaque-pointers -O2 -triple x86_64-apple-macosx10.9 -main-file-name c-linkage-available_externally.c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck %s
5 // CHECK: @__profc_foo = linkonce_odr hidden global [1 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
6 // CHECK: @__profd_foo = linkonce_odr hidden global {{.*}} i64 sub (i64 ptrtoint ([1 x i64]* @__profc_foo to i64), i64 ptrtoint ({ i64, i64, i64, i8*, i8*, i32, [2 x i16] }* @__profd_foo to i64)), {{.*}}, section "__DATA,__llvm_prf_data,regular,live_support", align 8
7 inline int foo(void) { return 1; }
9 int main(void) {
10 return foo();