20 lines · c
1// Test -fprofile-generate-cold-function-coverage 2 3// RUN: rm -rf %t && split-file %s %t4// RUN: %clang --target=x86_64 -O2 -fprofile-generate-cold-function-coverage=/xxx/yyy/ -fprofile-sample-accurate -fprofile-sample-use=%t/pgo-cold-func.prof -S -emit-llvm -o - %t/pgo-cold-func.c | FileCheck %s5 6// CHECK: @__llvm_profile_filename = {{.*}} c"/xxx/yyy/default_%m.profraw\00"7 8// CHECK: store i8 0, ptr @__profc_bar, align 19// CHECK-NOT: @__profc_foo 10 11//--- pgo-cold-func.prof12foo:1:113 1: 114 15//--- pgo-cold-func.c16int bar(int x) { return x;}17int foo(int x) { 18 return x;19}20