diff --git a/test/tools/llvm-cov/showProjectSummary.cpp b/test/tools/llvm-cov/showProjectSummary.cpp index 907fccb6bb8..cbf029eab64 100644 --- a/test/tools/llvm-cov/showProjectSummary.cpp +++ b/test/tools/llvm-cov/showProjectSummary.cpp @@ -13,6 +13,7 @@ int main(int argc, char ** argv) { // Test console output. // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile %t.profdata -path-equivalence=/tmp,%S %s | FileCheck -check-prefixes=TEXT,TEXT-FILE,TEXT-HEADER %S/Inputs/showProjectSummary.test +// RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile %t.profdata -path-equivalence=/tmp,%S -name=main %s | FileCheck -check-prefixes=TEXT,TEXT-FILE,TEXT-HEADER %S/Inputs/showProjectSummary.test // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile %t.profdata -project-title "Test Suite" -path-equivalence=/tmp,%S %s | FileCheck -check-prefixes=TEXT-TITLE,TEXT,TEXT-FILE,TEXT-HEADER %S/Inputs/showProjectSummary.test // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile %t.profdata -project-title "Test Suite" -name=main -path-equivalence=/tmp,%S %s | FileCheck -check-prefixes=TEXT-FUNCTION,TEXT-HEADER %S/Inputs/showProjectSummary.test // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile=%t.profdata -o %t.dir -path-equivalence=/tmp,%S %s diff --git a/tools/llvm-cov/CodeCoverage.cpp b/tools/llvm-cov/CodeCoverage.cpp index 1b9f23216ed..8d9f4d022ca 100644 --- a/tools/llvm-cov/CodeCoverage.cpp +++ b/tools/llvm-cov/CodeCoverage.cpp @@ -882,7 +882,7 @@ int CodeCoverageTool::show(int argc, const char **argv, } auto OS = std::move(OSOrErr.get()); - bool ShowTitle = true; + bool ShowTitle = ViewOpts.hasOutputDirectory(); for (const auto *Function : Functions) { auto FunctionView = createFunctionView(*Function, *Coverage); if (!FunctionView) {