Vedant Kumar | 51d8f88 | 2017-09-15 23:00:02 +0000 | [diff] [blame] | 1 | RUN: llvm-cov report -instr-profile %S/Inputs/multiple_objects/merged.profdata \ |
| 2 | RUN: %S/Inputs/multiple_objects/use_2.covmapping \ |
| 3 | RUN: -object %S/Inputs/multiple_objects/use_1.covmapping | FileCheck -check-prefix=REPORT %s |
| 4 | |
| 5 | REPORT: Filename{{ +}}Regions{{ +}}Missed Regions{{ +}}Cover |
| 6 | REPORT-NEXT: --- |
| 7 | REPORT-NEXT: header.h{{ +}}25{{ +}}14{{ +}}44.00% |
| 8 | |
Max Moroz | 0c5b602 | 2018-05-08 19:26:51 +0000 | [diff] [blame] | 9 | # Make sure that both use_1.cc and use_2.cc have coverage reported. |
| 10 | # Before https://reviews.llvm.org/D46478, only one of them used to be reported. |
| 11 | REPORT-NEXT: use_1.cc{{ +}}1{{ +}}0{{ +}}100.00% |
| 12 | REPORT-NEXT: use_2.cc{{ +}}2{{ +}}0{{ +}}100.00% |
| 13 | |
Vedant Kumar | 51d8f88 | 2017-09-15 23:00:02 +0000 | [diff] [blame] | 14 | Instructions for regenerating the test: |
| 15 | |
| 16 | clang -std=c++11 -mllvm -enable-name-compression=false -fprofile-instr-generate -fcoverage-mapping use_1.cc -o use_1 |
| 17 | clang -std=c++11 -mllvm -enable-name-compression=false -fprofile-instr-generate -fcoverage-mapping use_2.cc -o use_2 |
| 18 | LLVM_PROFILE_FILE="use_1.raw" ./use_1 |
| 19 | LLVM_PROFILE_FILE="use_2.raw" ./use_2 |
| 20 | llvm-profdata merge use_{1,2}.raw -o merged.profdata |
| 21 | llvm-cov convert-for-testing ./use_1 -o ./use_1.covmapping |
| 22 | llvm-cov convert-for-testing ./use_2 -o ./use_2.covmapping |