[llvm-objcopy] [COFF] Fix warnings abuilt missing field initialization. NFC.
[llvm-complete.git] / tools / llvm-cov / CoverageExporter.h
blobb226d68813d9cc731da43874e8aff60baa07f45f
1 //===- CoverageExporter.h - Code coverage exporter ------------------------===//
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 defines a code coverage exporter interface.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_COV_COVERAGEEXPORTER_H
15 #define LLVM_COV_COVERAGEEXPORTER_H
17 #include "CoverageFilters.h"
18 #include "CoverageSummaryInfo.h"
19 #include "CoverageViewOptions.h"
20 #include "llvm/ProfileData/Coverage/CoverageMapping.h"
22 namespace llvm {
24 /// Exports the code coverage information.
25 class CoverageExporter {
26 protected:
27 /// The full CoverageMapping object to export.
28 const coverage::CoverageMapping &Coverage;
30 /// The options passed to the tool.
31 const CoverageViewOptions &Options;
33 /// Output stream to print to.
34 raw_ostream &OS;
36 CoverageExporter(const coverage::CoverageMapping &CoverageMapping,
37 const CoverageViewOptions &Options, raw_ostream &OS)
38 : Coverage(CoverageMapping), Options(Options), OS(OS) {}
40 public:
41 virtual ~CoverageExporter(){};
43 /// Render the CoverageMapping object.
44 virtual void renderRoot(const CoverageFilters &IgnoreFilters) = 0;
46 /// Render the CoverageMapping object for specified source files.
47 virtual void renderRoot(ArrayRef<std::string> SourceFiles) = 0;
50 } // end namespace llvm
52 #endif // LLVM_COV_COVERAGEEXPORTER_H