|
1 | | -// RUN: %clang_profgen -fuse-ld=gold -O2 -fdata-sections -ffunction-sections -fprofile-instr-generate -fcoverage-mapping -Wl,--gc-sections -o %t %s |
| 1 | +// RUN: %clang_profgen -fuse-ld=gold -O2 -fdata-sections -ffunction-sections -fcoverage-mapping -Wl,--gc-sections -o %t %s |
2 | 2 | // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t |
3 | 3 | // RUN: llvm-profdata merge -o %t.profdata %t.profraw |
4 | 4 | // RUN: llvm-cov show %t -instr-profile %t.profdata -filename-equivalence 2>&1 | FileCheck %s |
5 | 5 | // BFD linker older than 2.26 has a bug that per-func profile data will be wrongly garbage collected when GC is turned on. We only do end-to-end test here without GC: |
6 | | -// RUN: %clang_profgen -O2 -fprofile-instr-generate -fcoverage-mapping -o %t.2 %s |
| 6 | +// RUN: %clang_profgen -O2 -fcoverage-mapping -o %t.2 %s |
7 | 7 | // RUN: env LLVM_PROFILE_FILE=%t.2.profraw %run %t.2 |
8 | 8 | // RUN: llvm-profdata merge -o %t.2.profdata %t.2.profraw |
9 | 9 | // RUN: llvm-cov show %t.2 -instr-profile %t.2.profdata -filename-equivalence 2>&1 | FileCheck %s |
10 | 10 | // Check covmap is not garbage collected when GC is turned on with BFD linker. Due to the bug mentioned above, we can only |
11 | 11 | // do the check with objdump: |
12 | | -// RUN: %clang_profgen -O2 -fprofile-instr-generate -fcoverage-mapping -Wl,--gc-sections -o %t.3 %s |
| 12 | +// RUN: %clang_profgen -O2 -fcoverage-mapping -Wl,--gc-sections -o %t.3 %s |
13 | 13 | // RUN: llvm-objdump -h %t.3 | FileCheck --check-prefix COVMAP %s |
14 | 14 | // Check PIE option |
15 | | -// RUN: %clang_profgen -fuse-ld=gold -O2 -fdata-sections -ffunction-sections -fPIE -pie -fprofile-instr-generate -fcoverage-mapping -Wl,--gc-sections -o %t.pie %s |
| 15 | +// RUN: %clang_profgen -fuse-ld=gold -O2 -fdata-sections -ffunction-sections -fPIE -pie -fcoverage-mapping -Wl,--gc-sections -o %t.pie %s |
16 | 16 | // RUN: env LLVM_PROFILE_FILE=%t.pie.profraw %run %t.pie |
17 | 17 | // RUN: llvm-profdata merge -o %t.pie.profdata %t.pie.profraw |
18 | 18 | // RUN: llvm-cov show %t.pie -instr-profile %t.pie.profdata -filename-equivalence 2>&1 | FileCheck %s |
|
0 commit comments