1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[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

llvm-svn: 285103
This commit is contained in:
Vedant Kumar 2016-10-25 19:52:57 +00:00
parent adc8631f84
commit 6fee2373b2

View File

@ -578,7 +578,7 @@ int CodeCoverageTool::run(Command Cmd, int argc, const char **argv) {
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, int argc, const char **argv) {
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;
}