CoverageExporterJson.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. //===- CoverageExporterJson.h - Code coverage JSON exporter ---------------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This class implements a code coverage exporter for JSON format.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. #ifndef LLVM_COV_COVERAGEEXPORTERJSON_H
  13. #define LLVM_COV_COVERAGEEXPORTERJSON_H
  14. #include "CoverageExporter.h"
  15. namespace llvm {
  16. class CoverageExporterJson : public CoverageExporter {
  17. public:
  18. CoverageExporterJson(const coverage::CoverageMapping &CoverageMapping,
  19. const CoverageViewOptions &Options, raw_ostream &OS)
  20. : CoverageExporter(CoverageMapping, Options, OS) {}
  21. /// Render the CoverageMapping object.
  22. void renderRoot(const CoverageFilters &IgnoreFilters) override;
  23. /// Render the CoverageMapping object for specified source files.
  24. void renderRoot(ArrayRef<std::string> SourceFiles) override;
  25. };
  26. } // end namespace llvm
  27. #endif // LLVM_COV_COVERAGEEXPORTERJSON_H