
Add a new instrumentation section type `[sample-coldcov]` to support`-fprofile-list` for sample pgo based cold function coverage. Note that the current cold function coverage is based on sampling PGO pipeline, which is incompatible with the existing [llvm] option(see [PGOOptions](https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Support/PGOOptions.h#L27-L43)), so we can't reuse the IR-PGO(-fprofile-instrument=llvm) flag.
10 lines
541 B
C
10 lines
541 B
C
// RUN: %clang -### -c -fprofile-generate-cold-function-coverage %s 2>&1 | FileCheck %s
|
|
// CHECK: "--instrument-cold-function-only-path=default_%m.profraw"
|
|
// CHECK: "--pgo-instrument-cold-function-only"
|
|
// CHECK: "--pgo-function-entry-coverage"
|
|
// CHECK: "-fprofile-instrument=sample-coldcov"
|
|
// CHECK-NOT: "-fprofile-instrument-path=
|
|
|
|
// RUN: %clang -### -c -fprofile-generate-cold-function-coverage=dir %s 2>&1 | FileCheck %s --check-prefix=CHECK-EQ
|
|
// CHECK-EQ: "--instrument-cold-function-only-path=dir{{/|\\\\}}default_%m.profraw"
|