Path: blob/main/contrib/llvm-project/llvm/tools/llvm-cov/CoverageExporter.h
35230 views
//===- CoverageExporter.h - Code coverage exporter ------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This class defines a code coverage exporter interface.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_COV_COVERAGEEXPORTER_H13#define LLVM_COV_COVERAGEEXPORTER_H1415#include "CoverageFilters.h"16#include "CoverageSummaryInfo.h"17#include "CoverageViewOptions.h"18#include "llvm/ProfileData/Coverage/CoverageMapping.h"1920namespace llvm {2122/// Exports the code coverage information.23class CoverageExporter {24protected:25/// The full CoverageMapping object to export.26const coverage::CoverageMapping &Coverage;2728/// The options passed to the tool.29const CoverageViewOptions &Options;3031/// Output stream to print to.32raw_ostream &OS;3334CoverageExporter(const coverage::CoverageMapping &CoverageMapping,35const CoverageViewOptions &Options, raw_ostream &OS)36: Coverage(CoverageMapping), Options(Options), OS(OS) {}3738public:39virtual ~CoverageExporter(){};4041/// Render the CoverageMapping object.42virtual void renderRoot(const CoverageFilters &IgnoreFilters) = 0;4344/// Render the CoverageMapping object for specified source files.45virtual void renderRoot(ArrayRef<std::string> SourceFiles) = 0;46};4748} // end namespace llvm4950#endif // LLVM_COV_COVERAGEEXPORTER_H515253