llvm.org GIT mirror llvm / 2006b41
[llvm-cov] Don't show function summaries when filtering by filename (fixes PR31395) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294137 91177308-0d34-0410-b5e6-96231b3b80d8 Vedant Kumar 2 years ago
4 changed file(s) with 12 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
321321 universal binary or to use an architecture that does not match a
322322 non-universal binary.
323323
324 .. option:: -show-functions
325
326 Show coverage summaries for each function.
327
324328 .. program:: llvm-cov export
325329
326330 .. _llvm-cov-export:
44 RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %t.profdata -Xdemangler sed -Xdemangler 's/_/X/g' -filename-equivalence %S/showTemplateInstantiations.cpp | FileCheck %s
55
66 // Check that we demangle names when printing out function summaries.
7 RUN: llvm-cov report %S/Inputs/templateInstantiations.covmapping -instr-profile %S/Inputs/templateInstantiations.profdata -Xdemangler sed -Xdemangler 's/_/X/g' -filename-equivalence %S/showTemplateInstantiations.cpp | FileCheck %s
7 RUN: llvm-cov report -show-functions %S/Inputs/templateInstantiations.covmapping -instr-profile %S/Inputs/templateInstantiations.profdata -Xdemangler sed -Xdemangler 's/_/X/g' -filename-equivalence %S/showTemplateInstantiations.cpp | FileCheck %s
88
99 CHECK-DAG: XZ4funcIbEiTX
1010 CHECK-DAG: XZ4funcIiEiTX
0 // RUN: llvm-cov report %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -filename-equivalence 2>&1 | FileCheck %s
1 // RUN: llvm-cov report %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -filename-equivalence report.cpp 2>&1 | FileCheck -check-prefix=FILT %s
2 // RUN: llvm-cov report %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -filename-equivalence report.cpp does-not-exist.cpp 2>&1 | FileCheck -check-prefix=FILT %s
1 // RUN: llvm-cov report -show-functions %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -filename-equivalence report.cpp 2>&1 | FileCheck -check-prefix=FILT %s
2 // RUN: llvm-cov report -show-functions %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -filename-equivalence report.cpp does-not-exist.cpp 2>&1 | FileCheck -check-prefix=FILT %s
33
44 // CHECK: Regions Missed Regions Cover Functions Missed Functions Executed Instantiations Missed Insts. Executed Lines Missed Lines Cover
55 // CHECK-NEXT: ---
807807
808808 int CodeCoverageTool::report(int argc, const char **argv,
809809 CommandLineParserType commandLineParser) {
810 cl::opt ShowFunctionSummaries(
811 "show-functions", cl::Optional, cl::init(false),
812 cl::desc("Show coverage summaries for each function"));
813
810814 auto Err = commandLineParser(argc, argv);
811815 if (Err)
812816 return Err;
819823 return 1;
820824
821825 CoverageReport Report(ViewOpts, *Coverage.get());
822 if (SourceFiles.empty())
826 if (!ShowFunctionSummaries)
823827 Report.renderFileReports(llvm::outs());
824828 else
825829 Report.renderFunctionReports(SourceFiles, DC, llvm::outs());