151d8f887SVedant KumarRUN: llvm-cov report -instr-profile %S/Inputs/multiple_objects/merged.profdata \ 251d8f887SVedant KumarRUN: %S/Inputs/multiple_objects/use_2.covmapping \ 351d8f887SVedant KumarRUN: -object %S/Inputs/multiple_objects/use_1.covmapping | FileCheck -check-prefix=REPORT %s 451d8f887SVedant Kumar 551d8f887SVedant KumarREPORT: Filename{{ +}}Regions{{ +}}Missed Regions{{ +}}Cover 651d8f887SVedant KumarREPORT-NEXT: --- 751d8f887SVedant KumarREPORT-NEXT: header.h{{ +}}25{{ +}}14{{ +}}44.00% 851d8f887SVedant Kumar 9*0c5b6020SMax Moroz# Make sure that both use_1.cc and use_2.cc have coverage reported. 10*0c5b6020SMax Moroz# Before https://reviews.llvm.org/D46478, only one of them used to be reported. 11*0c5b6020SMax MorozREPORT-NEXT: use_1.cc{{ +}}1{{ +}}0{{ +}}100.00% 12*0c5b6020SMax MorozREPORT-NEXT: use_2.cc{{ +}}2{{ +}}0{{ +}}100.00% 13*0c5b6020SMax Moroz 1451d8f887SVedant KumarInstructions for regenerating the test: 1551d8f887SVedant Kumar 1651d8f887SVedant Kumarclang -std=c++11 -mllvm -enable-name-compression=false -fprofile-instr-generate -fcoverage-mapping use_1.cc -o use_1 1751d8f887SVedant Kumarclang -std=c++11 -mllvm -enable-name-compression=false -fprofile-instr-generate -fcoverage-mapping use_2.cc -o use_2 1851d8f887SVedant KumarLLVM_PROFILE_FILE="use_1.raw" ./use_1 1951d8f887SVedant KumarLLVM_PROFILE_FILE="use_2.raw" ./use_2 2051d8f887SVedant Kumarllvm-profdata merge use_{1,2}.raw -o merged.profdata 2151d8f887SVedant Kumarllvm-cov convert-for-testing ./use_1 -o ./use_1.covmapping 2251d8f887SVedant Kumarllvm-cov convert-for-testing ./use_2 -o ./use_2.covmapping 23