| 1 |
// RUN: touch %t.o |
| 2 |
// |
| 3 |
// RUN: %clang --target=x86_64-unknown-linux -### %t.o -flto=thin \ |
| 4 |
// RUN: -fprofile-use 2>&1 | FileCheck %s |
| 5 |
|
| 6 |
// CHECK: -plugin-opt=cs-profile-path=default.profdata |
| 7 |
|
| 8 |
// RUN: %clang --target=apple-arm64-ios -### %t.o -flto=thin -fuse-ld=lld -B%S/Inputs/lld -fprofile-use 2>&1 | FileCheck %s --check-prefix=DARWIN-USE1 |
| 9 |
// RUN: %clang --target=apple-arm64-ios -### %t.o -flto=thin -fuse-ld=lld -B%S/Inputs/lld -fprofile-use=a.profdata 2>&1 | FileCheck %s --check-prefix=DARWIN-USE2 |
| 10 |
|
| 11 |
// DARWIN-USE1: "--cs-profile-path=default.profdata" |
| 12 |
// DARWIN-USE2: "--cs-profile-path=a.profdata" |
| 13 |
|
| 14 |
// RUN: %clang --target=apple-arm64-ios -### %t.o -flto=thin -fuse-ld=lld -B%S/Inputs/lld -fcs-profile-generate 2>&1 | FileCheck %s --check-prefix=DARWIN-GEN1 |
| 15 |
// RUN: %clang --target=apple-arm64-ios -### %t.o -flto=thin -fuse-ld=lld -B%S/Inputs/lld -fcs-profile-generate=directory 2>&1 | FileCheck %s --check-prefix=DARWIN-GEN2 |
| 16 |
|
| 17 |
// DARWIN-GEN1: "--cs-profile-generate" |
| 18 |
// DARWIN-GEN1-SAME: "--cs-profile-path=default_%m.profraw" |
| 19 |
// DARWIN-GEN2: "--cs-profile-generate" |
| 20 |
// DARWIN-GEN2-SAME: "--cs-profile-path=directory{{(/|\\\\)}}default_%m.profraw" |