CoverageReport.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //===- 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. #ifndef LLVM_COV_COVERAGEREPORT_H
  14. #define LLVM_COV_COVERAGEREPORT_H
  15. #include "CoverageSummaryInfo.h"
  16. #include "CoverageViewOptions.h"
  17. namespace llvm {
  18. /// \brief Displays the code coverage report.
  19. class CoverageReport {
  20. const CoverageViewOptions &Options;
  21. std::unique_ptr<coverage::CoverageMapping> Coverage;
  22. void render(const FileCoverageSummary &File, raw_ostream &OS);
  23. void render(const FunctionCoverageSummary &Function, raw_ostream &OS);
  24. public:
  25. CoverageReport(const CoverageViewOptions &Options,
  26. std::unique_ptr<coverage::CoverageMapping> Coverage)
  27. : Options(Options), Coverage(std::move(Coverage)) {}
  28. void renderFunctionReports(ArrayRef<std::string> Files, raw_ostream &OS);
  29. void renderFileReports(raw_ostream &OS);
  30. };
  31. }
  32. #endif // LLVM_COV_COVERAGEREPORT_H