1 //===- CoverageViewOptions.h - Code coverage display options -------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_COV_COVERAGEVIEWOPTIONS_H
11 #define LLVM_COV_COVERAGEVIEWOPTIONS_H
13 #include "RenderingSupport.h"
18 /// \brief The options for displaying the code coverage information.
19 struct CoverageViewOptions {
20 enum class OutputFormat {
29 bool ShowRegionMarkers;
30 bool ShowLineStatsOrRegionMarkers;
31 bool ShowExpandedRegions;
32 bool ShowFunctionInstantiations;
33 bool ShowFullFilenames;
35 std::string ShowOutputDirectory;
36 std::vector<std::string> DemanglerOpts;
38 /// \brief Change the output's stream color if the colors are enabled.
39 ColoredRawOstream colored_ostream(raw_ostream &OS,
40 raw_ostream::Colors Color) const {
41 return llvm::colored_ostream(OS, Color, Colors);
44 /// \brief Check if an output directory has been specified.
45 bool hasOutputDirectory() const { return !ShowOutputDirectory.empty(); }
47 /// \brief Check if a demangler has been specified.
48 bool hasDemangler() const { return !DemanglerOpts.empty(); }
52 #endif // LLVM_COV_COVERAGEVIEWOPTIONS_H