annotate tools/llvm-cov/CoverageViewOptions.h @ 124:4fa72497ed5d

fix
author mir3636
date Thu, 30 Nov 2017 20:04:56 +0900
parents 803732b1fca8
children 3a76565eade5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
77
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 //===- CoverageViewOptions.h - Code coverage display options -------------===//
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 //
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 // The LLVM Compiler Infrastructure
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 //
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 // This file is distributed under the University of Illinois Open Source
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 // License. See LICENSE.TXT for details.
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 //
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 //===----------------------------------------------------------------------===//
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 #ifndef LLVM_COV_COVERAGEVIEWOPTIONS_H
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 #define LLVM_COV_COVERAGEVIEWOPTIONS_H
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 #include "RenderingSupport.h"
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
14 #include <vector>
77
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 namespace llvm {
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 /// \brief The options for displaying the code coverage information.
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 struct CoverageViewOptions {
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
20 enum class OutputFormat {
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
21 Text,
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
22 HTML
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
23 };
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
24
77
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 bool Debug;
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 bool Colors;
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 bool ShowLineNumbers;
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 bool ShowLineStats;
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 bool ShowRegionMarkers;
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 bool ShowExpandedRegions;
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 bool ShowFunctionInstantiations;
95
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 77
diff changeset
32 bool ShowFullFilenames;
121
803732b1fca8 LLVM 5.0
kono
parents: 120
diff changeset
33 bool ShowRegionSummary;
803732b1fca8 LLVM 5.0
kono
parents: 120
diff changeset
34 bool ShowInstantiationSummary;
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
35 OutputFormat Format;
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
36 std::string ShowOutputDirectory;
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
37 std::vector<std::string> DemanglerOpts;
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
38 uint32_t TabSize;
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
39 std::string ProjectTitle;
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
40 std::string CreatedTimeStr;
77
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 /// \brief Change the output's stream color if the colors are enabled.
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 ColoredRawOstream colored_ostream(raw_ostream &OS,
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 raw_ostream::Colors Color) const {
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 return llvm::colored_ostream(OS, Color, Colors);
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 }
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
47
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
48 /// \brief Check if an output directory has been specified.
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
49 bool hasOutputDirectory() const { return !ShowOutputDirectory.empty(); }
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
50
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
51 /// \brief Check if a demangler has been specified.
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
52 bool hasDemangler() const { return !DemanglerOpts.empty(); }
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
53
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
54 /// \brief Check if a project title has been specified.
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
55 bool hasProjectTitle() const { return !ProjectTitle.empty(); }
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
56
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
57 /// \brief Check if the created time of the profile data file is available.
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
58 bool hasCreatedTime() const { return !CreatedTimeStr.empty(); }
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
59
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
60 /// \brief Get the LLVM version string.
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
61 std::string getLLVMVersionString() const {
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
62 std::string VersionString = "Generated by llvm-cov -- llvm version ";
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
63 VersionString += LLVM_VERSION_STRING;
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
64 return VersionString;
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
65 }
77
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 };
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 }
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 #endif // LLVM_COV_COVERAGEVIEWOPTIONS_H