blob: d18611740ae6b1ad2d1a0116dea6499fa422f64e [file] [log] [blame]
Alex Lorenze82d89c2014-08-22 22:56:03 +00001//===- CoverageReport.h - Code coverage report ---------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This class implements rendering of a code coverage report.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_COV_COVERAGEREPORT_H
15#define LLVM_COV_COVERAGEREPORT_H
16
Alex Lorenze82d89c2014-08-22 22:56:03 +000017#include "CoverageSummary.h"
Chandler Carruthd9903882015-01-14 11:23:27 +000018#include "CoverageViewOptions.h"
Alex Lorenze82d89c2014-08-22 22:56:03 +000019
20namespace llvm {
21
22/// \brief Displays the code coverage report.
23class CoverageReport {
24 const CoverageViewOptions &Options;
25 CoverageSummary &Summary;
26
27 void render(const FileCoverageSummary &File, raw_ostream &OS);
28 void render(const FunctionCoverageSummary &Function, raw_ostream &OS);
29
30public:
31 CoverageReport(const CoverageViewOptions &Options, CoverageSummary &Summary)
32 : Options(Options), Summary(Summary) {}
33
34 void renderFunctionReports(raw_ostream &OS);
35
36 void renderFileReports(raw_ostream &OS);
37};
38}
39
40#endif // LLVM_COV_COVERAGEREPORT_H