1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00

[llvm-cov] Fix showing title when filtering and not outputting to a directory

Differential Revision: https://reviews.llvm.org/D38507

llvm-svn: 314885
This commit is contained in:
Sean Eveson 2017-10-04 08:54:37 +00:00
parent a4b2f4a4c1
commit 69a379ddcd
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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) {