[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Profile / c-linkage.c
blob50ac558fb0761b9edebbc2e1ba0e107b8c4bfebe
1 // Check that the profiling counters and data we create have the linkage we expect
2 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-linkage.c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck %s
4 // CHECK: @__profc_foo = private global
5 // CHECK: @__profd_foo = private global
6 // CHECK: @__profc_foo_weak = weak hidden global
7 // CHECK: @__profd_foo_weak = weak hidden global
8 // CHECK: @__profc_main = private global
9 // CHECK: @__profd_main = private global
10 // CHECK: @__profc_c_linkage.c_foo_internal = private global
11 // CHECK: @__profd_c_linkage.c_foo_internal = private global
13 void foo(void) { }
15 void foo_weak(void) __attribute__((weak));
16 void foo_weak(void) { if (0){} if (0){} if (0){} if (0){} }
18 static void foo_internal(void);
19 int main(void) {
20 foo();
21 foo_internal();
22 foo_weak();
23 return 0;
26 static void foo_internal(void) { if (0){} if (0){} }