diff options
Diffstat (limited to 'contrib/llvm/tools/llvm-cov/SourceCoverageViewHTML.h')
-rw-r--r-- | contrib/llvm/tools/llvm-cov/SourceCoverageViewHTML.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/contrib/llvm/tools/llvm-cov/SourceCoverageViewHTML.h b/contrib/llvm/tools/llvm-cov/SourceCoverageViewHTML.h index 50ecf2b..94b08a5 100644 --- a/contrib/llvm/tools/llvm-cov/SourceCoverageViewHTML.h +++ b/contrib/llvm/tools/llvm-cov/SourceCoverageViewHTML.h @@ -18,6 +18,8 @@ namespace llvm { +struct FileCoverageSummary; + /// \brief A coverage printer for html output. class CoveragePrinterHTML : public CoveragePrinter { public: @@ -26,10 +28,16 @@ public: void closeViewFile(OwnedStream OS) override; - Error createIndexFile(ArrayRef<StringRef> SourceFiles) override; + Error createIndexFile(ArrayRef<std::string> SourceFiles, + const coverage::CoverageMapping &Coverage) override; CoveragePrinterHTML(const CoverageViewOptions &Opts) : CoveragePrinter(Opts) {} + +private: + void emitFileSummary(raw_ostream &OS, StringRef SF, + const FileCoverageSummary &FCS, + bool IsTotals = false) const; }; /// \brief A code coverage view which supports html-based rendering. @@ -38,7 +46,7 @@ class SourceCoverageViewHTML : public SourceCoverageView { void renderViewFooter(raw_ostream &OS) override; - void renderSourceName(raw_ostream &OS) override; + void renderSourceName(raw_ostream &OS, bool WholeFile) override; void renderLinePrefix(raw_ostream &OS, unsigned ViewDepth) override; @@ -70,6 +78,11 @@ class SourceCoverageViewHTML : public SourceCoverageView { void renderRegionMarkers(raw_ostream &OS, CoverageSegmentArray Segments, unsigned ViewDepth) override; + void renderTitle(raw_ostream &OS, StringRef Title) override; + + void renderTableHeader(raw_ostream &OS, unsigned FirstUncoveredLineNo, + unsigned IndentLevel) override; + public: SourceCoverageViewHTML(StringRef SourceName, const MemoryBuffer &File, const CoverageViewOptions &Options, |