mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 07:36:06 +00:00

In Continuous instrumentation profiling mode, profile or coverage data collected via compiler instrumentation is continuously synced to the profile file. This feature has existed for a while, and is documented here: https://clang.llvm.org/docs/SourceBasedCodeCoverage.html#running-the-instrumented-program This PR creates a user facing option to enable the feature. --------- Co-authored-by: Wael Yehia <wyehia@ca.ibm.com>
12 lines
949 B
C
12 lines
949 B
C
// RUN: %clang_cc1 -emit-llvm -fprofile-instrument=llvm -fprofile-continuous %s -o - | FileCheck %s --check-prefix=IRPGO
|
|
// RUN: %clang_cc1 -emit-llvm -fprofile-instrument=llvm -fprofile-continuous -fprofile-instrument-path=mydir/default_%m.profraw -mllvm -runtime-counter-relocation %s -o - \
|
|
// RUN: | FileCheck %s --check-prefix=IRPGO_EQ
|
|
// RUN: %clang_cc1 -emit-llvm -O2 -fprofile-instrument=csllvm -fprofile-continuous %s -o - | FileCheck %s --check-prefix=CSIRPGO
|
|
// RUN: %clang_cc1 -emit-llvm -fprofile-instrument=clang -fprofile-continuous -fprofile-instrument-path=default.profraw %s -o - | FileCheck %s --check-prefix=CLANG_PGO
|
|
|
|
// IRPGO: @__llvm_profile_filename = {{.*}} c"%cdefault_%m.profraw\00"
|
|
// IRPGO_EQ: @__llvm_profile_filename = {{.*}} c"%cmydir/default_%m.profraw\00"
|
|
// CSIRPGO: @__llvm_profile_filename = {{.*}} c"%cdefault_%m.profraw\00"
|
|
// CLANG_PGO: @__llvm_profile_filename = {{.*}} c"%cdefault.profraw\00"
|
|
void foo(){}
|