2014-08-23 06:56:03 +08:00
|
|
|
//===- CoverageReport.h - Code coverage report ---------------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This class implements rendering of a code coverage report.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_COV_COVERAGEREPORT_H
|
|
|
|
#define LLVM_COV_COVERAGEREPORT_H
|
|
|
|
|
2015-02-14 10:01:24 +08:00
|
|
|
#include "CoverageSummaryInfo.h"
|
2015-01-14 19:23:27 +08:00
|
|
|
#include "CoverageViewOptions.h"
|
2014-08-23 06:56:03 +08:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
/// \brief Displays the code coverage report.
|
|
|
|
class CoverageReport {
|
|
|
|
const CoverageViewOptions &Options;
|
2015-02-14 10:01:24 +08:00
|
|
|
std::unique_ptr<coverage::CoverageMapping> Coverage;
|
2014-08-23 06:56:03 +08:00
|
|
|
|
|
|
|
void render(const FileCoverageSummary &File, raw_ostream &OS);
|
|
|
|
void render(const FunctionCoverageSummary &Function, raw_ostream &OS);
|
|
|
|
|
|
|
|
public:
|
2015-02-14 10:01:24 +08:00
|
|
|
CoverageReport(const CoverageViewOptions &Options,
|
|
|
|
std::unique_ptr<coverage::CoverageMapping> Coverage)
|
|
|
|
: Options(Options), Coverage(std::move(Coverage)) {}
|
2014-08-23 06:56:03 +08:00
|
|
|
|
2015-02-14 10:05:05 +08:00
|
|
|
void renderFunctionReports(ArrayRef<std::string> Files, raw_ostream &OS);
|
2014-08-23 06:56:03 +08:00
|
|
|
|
|
|
|
void renderFileReports(raw_ostream &OS);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // LLVM_COV_COVERAGEREPORT_H
|