summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov/CodeCoverage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-cov/CodeCoverage.cpp')
-rw-r--r--llvm/tools/llvm-cov/CodeCoverage.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp
index 781d1948ccd..6179c760d5b 100644
--- a/llvm/tools/llvm-cov/CodeCoverage.cpp
+++ b/llvm/tools/llvm-cov/CodeCoverage.cpp
@@ -818,8 +818,10 @@ int CodeCoverageTool::report(int argc, const char **argv,
if (Err)
return Err;
- if (ViewOpts.Format == CoverageViewOptions::OutputFormat::HTML)
+ if (ViewOpts.Format == CoverageViewOptions::OutputFormat::HTML) {
error("HTML output for summary reports is not yet supported.");
+ return 1;
+ }
auto Coverage = load();
if (!Coverage)
@@ -840,6 +842,11 @@ int CodeCoverageTool::export_(int argc, const char **argv,
if (Err)
return Err;
+ if (ViewOpts.Format != CoverageViewOptions::OutputFormat::Text) {
+ error("Coverage data can only be exported as textual JSON.");
+ return 1;
+ }
+
auto Coverage = load();
if (!Coverage) {
error("Could not load coverage information");
OpenPOWER on IntegriCloud