[ARM] Prevent generating NEON stack accesses under MVE.
[llvm-complete.git] / tools / llvm-cov / CoverageViewOptions.h
blobdde0c692ab054f9034fabcc3182b8aa4b62fe7f2
1 //===- CoverageViewOptions.h - Code coverage display options -------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_COV_COVERAGEVIEWOPTIONS_H
10 #define LLVM_COV_COVERAGEVIEWOPTIONS_H
12 #include "llvm/Config/llvm-config.h"
13 #include "RenderingSupport.h"
14 #include <vector>
16 namespace llvm {
18 /// The options for displaying the code coverage information.
19 struct CoverageViewOptions {
20 enum class OutputFormat {
21 Text,
22 HTML,
23 Lcov
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 bool SkipExpansions;
38 bool SkipFunctions;
39 OutputFormat Format;
40 std::string ShowOutputDirectory;
41 std::vector<std::string> DemanglerOpts;
42 uint32_t TabSize;
43 std::string ProjectTitle;
44 std::string CreatedTimeStr;
45 unsigned NumThreads;
47 /// Change the output's stream color if the colors are enabled.
48 ColoredRawOstream colored_ostream(raw_ostream &OS,
49 raw_ostream::Colors Color) const {
50 return llvm::colored_ostream(OS, Color, Colors);
53 /// Check if an output directory has been specified.
54 bool hasOutputDirectory() const { return !ShowOutputDirectory.empty(); }
56 /// Check if a demangler has been specified.
57 bool hasDemangler() const { return !DemanglerOpts.empty(); }
59 /// Check if a project title has been specified.
60 bool hasProjectTitle() const { return !ProjectTitle.empty(); }
62 /// Check if the created time of the profile data file is available.
63 bool hasCreatedTime() const { return !CreatedTimeStr.empty(); }
65 /// Get the LLVM version string.
66 std::string getLLVMVersionString() const {
67 std::string VersionString = "Generated by llvm-cov -- llvm version ";
68 VersionString += LLVM_VERSION_STRING;
69 return VersionString;
74 #endif // LLVM_COV_COVERAGEVIEWOPTIONS_H