Revert "[lldb][test] Remove compiler version check and use regex" (#124101)
[llvm-project.git] / compiler-rt / test / profile / Darwin / instrprof-debug-info-correlate.c
blobf347d439e2e0671b2f0c60137b4920538bb2f424
1 // Value profiling is currently not supported in lightweight mode.
2 // RUN: %clang_pgogen -o %t -g -mllvm --debug-info-correlate -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
3 // RUN: env LLVM_PROFILE_FILE=%t.proflite %run %t
4 // RUN: llvm-profdata merge -o %t.profdata --debug-info=%t.dSYM %t.proflite
6 // RUN: %clang_pgogen -o %t.normal -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
7 // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t.normal
8 // RUN: llvm-profdata merge -o %t.normal.profdata %t.profraw
10 // RUN: diff <(llvm-profdata show --all-functions --counts %t.normal.profdata) <(llvm-profdata show --all-functions --counts %t.profdata)
12 // RUN: %clang_pgogen -o %t.cov -g -mllvm --debug-info-correlate -mllvm -pgo-function-entry-coverage -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
13 // RUN: env LLVM_PROFILE_FILE=%t.cov.proflite %run %t.cov
14 // RUN: llvm-profdata merge -o %t.cov.profdata --debug-info=%t.cov.dSYM %t.cov.proflite
16 // RUN: %clang_pgogen -o %t.cov.normal -mllvm --pgo-function-entry-coverage -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
17 // RUN: env LLVM_PROFILE_FILE=%t.cov.profraw %run %t.cov.normal
18 // RUN: llvm-profdata merge -o %t.cov.normal.profdata %t.cov.profraw
20 // RUN: diff <(llvm-profdata show --all-functions --counts %t.cov.normal.profdata) <(llvm-profdata show --all-functions --counts %t.cov.profdata)
22 // Test debug info correlate with online merging.
24 // RUN: env LLVM_PROFILE_FILE=%t-1.profraw %run %t.normal
25 // RUN: env LLVM_PROFILE_FILE=%t-2.profraw %run %t.normal
26 // RUN: llvm-profdata merge -o %t.normal.profdata %t-1.profraw %t-2.profraw
28 // RUN: rm -rf %t.profdir && mkdir %t.profdir
29 // RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.proflite %run %t
30 // RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.proflite %run %t
31 // RUN: llvm-profdata merge -o %t.profdata --debug-info=%t.dSYM %t.profdir/
33 // RUN: diff <(llvm-profdata show --all-functions --counts %t.normal.profdata) <(llvm-profdata show --all-functions --counts %t.profdata)
35 // RUN: rm -rf %t.profdir && mkdir %t.profdir
36 // RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.cov.proflite %run %t.cov
37 // RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.cov.proflite %run %t.cov
38 // RUN: llvm-profdata merge -o %t.cov.profdata --debug-info=%t.cov.dSYM %t.profdir/
40 // RUN: diff <(llvm-profdata show --all-functions --counts %t.cov.normal.profdata) <(llvm-profdata show --all-functions --counts %t.cov.profdata)