mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
[llvm-cov] Don't show function summaries when filtering by filename (fixes PR31395)
llvm-svn: 294137
This commit is contained in:
parent
3bbd2fe472
commit
b94c73d820
@ -322,6 +322,10 @@ OPTIONS
|
||||
universal binary or to use an architecture that does not match a
|
||||
non-universal binary.
|
||||
|
||||
.. option:: -show-functions
|
||||
|
||||
Show coverage summaries for each function.
|
||||
|
||||
.. program:: llvm-cov export
|
||||
|
||||
.. _llvm-cov-export:
|
||||
|
@ -5,7 +5,7 @@ RUN: llvm-profdata merge %S/Inputs/hideUnexecutedSubviews.proftext -o %t.profdat
|
||||
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
|
||||
|
||||
// Check that we demangle names when printing out function summaries.
|
||||
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
|
||||
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
|
||||
|
||||
CHECK-DAG: XZ4funcIbEiTX
|
||||
CHECK-DAG: XZ4funcIiEiTX
|
||||
|
@ -1,6 +1,6 @@
|
||||
// RUN: llvm-cov report %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -filename-equivalence 2>&1 | FileCheck %s
|
||||
// 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
|
||||
// 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
|
||||
// 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
|
||||
// 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
|
||||
|
||||
// CHECK: Regions Missed Regions Cover Functions Missed Functions Executed Instantiations Missed Insts. Executed Lines Missed Lines Cover
|
||||
// CHECK-NEXT: ---
|
||||
|
@ -808,6 +808,10 @@ int CodeCoverageTool::show(int argc, const char **argv,
|
||||
|
||||
int CodeCoverageTool::report(int argc, const char **argv,
|
||||
CommandLineParserType commandLineParser) {
|
||||
cl::opt<bool> ShowFunctionSummaries(
|
||||
"show-functions", cl::Optional, cl::init(false),
|
||||
cl::desc("Show coverage summaries for each function"));
|
||||
|
||||
auto Err = commandLineParser(argc, argv);
|
||||
if (Err)
|
||||
return Err;
|
||||
@ -820,7 +824,7 @@ int CodeCoverageTool::report(int argc, const char **argv,
|
||||
return 1;
|
||||
|
||||
CoverageReport Report(ViewOpts, *Coverage.get());
|
||||
if (SourceFiles.empty())
|
||||
if (!ShowFunctionSummaries)
|
||||
Report.renderFileReports(llvm::outs());
|
||||
else
|
||||
Report.renderFunctionReports(SourceFiles, DC, llvm::outs());
|
||||
|
Loading…
Reference in New Issue
Block a user