Mercurial > hg > CbC > CbC_llvm
comparison tools/llvm-cov/CoverageReport.h @ 122:36195a0db682
merging ( incomplete )
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 17 Nov 2017 20:32:31 +0900 |
parents | 803732b1fca8 |
children | 3a76565eade5 |
comparison
equal
deleted
inserted
replaced
119:d9df2cbd60cd | 122:36195a0db682 |
---|---|
12 //===----------------------------------------------------------------------===// | 12 //===----------------------------------------------------------------------===// |
13 | 13 |
14 #ifndef LLVM_COV_COVERAGEREPORT_H | 14 #ifndef LLVM_COV_COVERAGEREPORT_H |
15 #define LLVM_COV_COVERAGEREPORT_H | 15 #define LLVM_COV_COVERAGEREPORT_H |
16 | 16 |
17 #include "CoverageFilters.h" | |
17 #include "CoverageSummaryInfo.h" | 18 #include "CoverageSummaryInfo.h" |
18 #include "CoverageViewOptions.h" | 19 #include "CoverageViewOptions.h" |
19 | 20 |
20 namespace llvm { | 21 namespace llvm { |
21 | 22 |
22 /// \brief Displays the code coverage report. | 23 /// \brief Displays the code coverage report. |
23 class CoverageReport { | 24 class CoverageReport { |
24 const CoverageViewOptions &Options; | 25 const CoverageViewOptions &Options; |
25 std::unique_ptr<coverage::CoverageMapping> Coverage; | 26 const coverage::CoverageMapping &Coverage; |
26 | 27 |
27 void render(const FileCoverageSummary &File, raw_ostream &OS); | 28 void render(const FileCoverageSummary &File, raw_ostream &OS) const; |
28 void render(const FunctionCoverageSummary &Function, raw_ostream &OS); | 29 void render(const FunctionCoverageSummary &Function, const DemangleCache &DC, |
30 raw_ostream &OS) const; | |
29 | 31 |
30 public: | 32 public: |
31 CoverageReport(const CoverageViewOptions &Options, | 33 CoverageReport(const CoverageViewOptions &Options, |
32 std::unique_ptr<coverage::CoverageMapping> Coverage) | 34 const coverage::CoverageMapping &Coverage) |
33 : Options(Options), Coverage(std::move(Coverage)) {} | 35 : Options(Options), Coverage(Coverage) {} |
34 | 36 |
35 void renderFunctionReports(ArrayRef<std::string> Files, raw_ostream &OS); | 37 void renderFunctionReports(ArrayRef<std::string> Files, |
38 const DemangleCache &DC, raw_ostream &OS); | |
36 | 39 |
37 void renderFileReports(raw_ostream &OS); | 40 /// Prepare file reports for the files specified in \p Files. |
41 static std::vector<FileCoverageSummary> | |
42 prepareFileReports(const coverage::CoverageMapping &Coverage, | |
43 FileCoverageSummary &Totals, ArrayRef<std::string> Files, | |
44 const CoverageViewOptions &Options, | |
45 const CoverageFilter &Filters = CoverageFiltersMatchAll()); | |
46 | |
47 /// Render file reports for every unique file in the coverage mapping. | |
48 void renderFileReports(raw_ostream &OS) const; | |
49 | |
50 /// Render file reports for the files specified in \p Files. | |
51 void renderFileReports(raw_ostream &OS, ArrayRef<std::string> Files) const; | |
52 | |
53 /// Render file reports for the files specified in \p Files and the functions | |
54 /// in \p Filters. | |
55 void renderFileReports(raw_ostream &OS, ArrayRef<std::string> Files, | |
56 const CoverageFiltersMatchAll &Filters) const; | |
38 }; | 57 }; |
39 } | 58 |
59 } // end namespace llvm | |
40 | 60 |
41 #endif // LLVM_COV_COVERAGEREPORT_H | 61 #endif // LLVM_COV_COVERAGEREPORT_H |