[llvm] r285103 - [llvm-cov] Don't use colored output until we know it's supported
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 25 12:52:58 PDT 2016
Author: vedantk
Date: Tue Oct 25 14:52:57 2016
New Revision: 285103
URL: http://llvm.org/viewvc/llvm-project?rev=285103&view=rev
Log:
[llvm-cov] Don't use colored output until we know it's supported
CodeCoverageTool::error() depends on CoverageViewOptions::Colors being
initialized. Should fix:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/56
Modified:
llvm/trunk/tools/llvm-cov/CodeCoverage.cpp
Modified: llvm/trunk/tools/llvm-cov/CodeCoverage.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cov/CodeCoverage.cpp?rev=285103&r1=285102&r2=285103&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-cov/CodeCoverage.cpp (original)
+++ llvm/trunk/tools/llvm-cov/CodeCoverage.cpp Tue Oct 25 14:52:57 2016
@@ -578,7 +578,7 @@ int CodeCoverageTool::run(Command Cmd, i
for (const std::string &Filename : CovFilenames)
ObjectFilenames.emplace_back(Filename);
if (ObjectFilenames.empty()) {
- error("No filenames specified!");
+ errs() << "No filenames specified!\n";
::exit(1);
}
@@ -591,7 +591,7 @@ int CodeCoverageTool::run(Command Cmd, i
break;
case CoverageViewOptions::OutputFormat::HTML:
if (UseColor == cl::BOU_FALSE)
- error("Color output cannot be disabled when generating html.");
+ errs() << "Color output cannot be disabled when generating html.\n";
ViewOpts.Colors = true;
break;
}
More information about the llvm-commits
mailing list