brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · ecb5aad Raw
20 lines · c
1// RUN: rm -rf %t && mkdir %t2// RUN: llvm-profdata merge -o %t/a.profdata %S/Inputs/a.proftext3 4// RUN: %clang -### -c -fprofile-use=%t/a.profdata -fcs-profile-generate %s 2>&1 | FileCheck %s5// CHECK:      "-fprofile-instrument=csllvm"6// CHECK-NOT:  "-fprofile-instrument-path=7// CHECK-SAME: "-fprofile-instrument-use=llvm"8// CHECK-SAME: "-fprofile-instrument-use-path={{.*}}a.profdata"9 10// RUN: %clang -### -c -fprofile-use=%t/a.profdata -fcs-profile-generate=dir %s 2>&1 | FileCheck %s --check-prefix=CHECK111// CHECK1: "-fprofile-instrument=csllvm"{{.*}} "-fprofile-instrument-path=dir{{/|\\\\}}default_%m.profraw" "-fprofile-instrument-use=llvm" "-fprofile-instrument-use-path={{.*}}a.profdata"12 13/// Degradation case. This usage does not make much sense.14// RUN: %clang -### -c -fcs-profile-generate %s 2>&1 | FileCheck %s --check-prefix=NOUSE15// NOUSE:     "-fprofile-instrument=csllvm"16// NOUSE-NOT: "-fprofile-instrument-path=17 18// RUN: not %clang -### -c -fprofile-generate -fcs-profile-generate %s 2>&1 | FileCheck %s --check-prefix=CONFLICT19// CONFLICT: error: invalid argument '-fcs-profile-generate' not allowed with '-fprofile-generate'20