[llvm-cov] Add support for creating html reports
Based on a patch by Harlan Haskins! Differential Revision: http://reviews.llvm.org/D18278 llvm-svn: 274688
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "SourceCoverageView.h"
|
||||
#include "SourceCoverageViewHTML.h"
|
||||
#include "SourceCoverageViewText.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
#include "llvm/ADT/StringExtras.h"
|
||||
@@ -74,6 +75,8 @@ CoveragePrinter::create(const CoverageViewOptions &Opts) {
|
||||
switch (Opts.Format) {
|
||||
case CoverageViewOptions::OutputFormat::Text:
|
||||
return llvm::make_unique<CoveragePrinterText>(Opts);
|
||||
case CoverageViewOptions::OutputFormat::HTML:
|
||||
return llvm::make_unique<CoveragePrinterHTML>(Opts);
|
||||
}
|
||||
llvm_unreachable("Unknown coverage output format!");
|
||||
}
|
||||
@@ -111,6 +114,9 @@ SourceCoverageView::create(StringRef SourceName, const MemoryBuffer &File,
|
||||
case CoverageViewOptions::OutputFormat::Text:
|
||||
return llvm::make_unique<SourceCoverageViewText>(SourceName, File, Options,
|
||||
std::move(CoverageInfo));
|
||||
case CoverageViewOptions::OutputFormat::HTML:
|
||||
return llvm::make_unique<SourceCoverageViewHTML>(SourceName, File, Options,
|
||||
std::move(CoverageInfo));
|
||||
}
|
||||
llvm_unreachable("Unknown coverage output format!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user