[PowerPC] Optimize compares fed by ANDISo
[llvm-core.git] / tools / llvm-cov / CoverageViewOptions.h
blob20085a957bb5b61f481e33cdeeecb2e328716dbf
1 //===- CoverageViewOptions.h - Code coverage display options -------------===//
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 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_COV_COVERAGEVIEWOPTIONS_H
11 #define LLVM_COV_COVERAGEVIEWOPTIONS_H
13 #include "llvm/Config/llvm-config.h"
14 #include "RenderingSupport.h"
15 #include <vector>
17 namespace llvm {
19 /// The options for displaying the code coverage information.
20 struct CoverageViewOptions {
21 enum class OutputFormat {
22 Text,
23 HTML
26 bool Debug;
27 bool Colors;
28 bool ShowLineNumbers;
29 bool ShowLineStats;
30 bool ShowRegionMarkers;
31 bool ShowExpandedRegions;
32 bool ShowFunctionInstantiations;
33 bool ShowFullFilenames;
34 bool ShowRegionSummary;
35 bool ShowInstantiationSummary;
36 bool ExportSummaryOnly;
37 OutputFormat Format;
38 std::string ShowOutputDirectory;
39 std::vector<std::string> DemanglerOpts;
40 uint32_t TabSize;
41 std::string ProjectTitle;
42 std::string CreatedTimeStr;
43 unsigned NumThreads;
45 /// Change the output's stream color if the colors are enabled.
46 ColoredRawOstream colored_ostream(raw_ostream &OS,
47 raw_ostream::Colors Color) const {
48 return llvm::colored_ostream(OS, Color, Colors);
51 /// Check if an output directory has been specified.
52 bool hasOutputDirectory() const { return !ShowOutputDirectory.empty(); }
54 /// Check if a demangler has been specified.
55 bool hasDemangler() const { return !DemanglerOpts.empty(); }
57 /// Check if a project title has been specified.
58 bool hasProjectTitle() const { return !ProjectTitle.empty(); }
60 /// Check if the created time of the profile data file is available.
61 bool hasCreatedTime() const { return !CreatedTimeStr.empty(); }
63 /// Get the LLVM version string.
64 std::string getLLVMVersionString() const {
65 std::string VersionString = "Generated by llvm-cov -- llvm version ";
66 VersionString += LLVM_VERSION_STRING;
67 return VersionString;
72 #endif // LLVM_COV_COVERAGEVIEWOPTIONS_H