2014-08-23 00:56:03 +02:00
|
|
|
//===- CoverageViewOptions.h - Code coverage display options -------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_COV_COVERAGEVIEWOPTIONS_H
|
|
|
|
#define LLVM_COV_COVERAGEVIEWOPTIONS_H
|
|
|
|
|
|
|
|
#include "RenderingSupport.h"
|
2016-07-16 00:44:57 +02:00
|
|
|
#include <vector>
|
2014-08-23 00:56:03 +02:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
/// \brief The options for displaying the code coverage information.
|
|
|
|
struct CoverageViewOptions {
|
2016-06-28 02:15:54 +02:00
|
|
|
enum class OutputFormat {
|
2016-07-06 23:44:05 +02:00
|
|
|
Text,
|
|
|
|
HTML
|
2016-06-28 02:15:54 +02:00
|
|
|
};
|
|
|
|
|
2014-08-23 00:56:03 +02:00
|
|
|
bool Debug;
|
|
|
|
bool Colors;
|
|
|
|
bool ShowLineNumbers;
|
|
|
|
bool ShowLineStats;
|
|
|
|
bool ShowRegionMarkers;
|
|
|
|
bool ShowExpandedRegions;
|
|
|
|
bool ShowFunctionInstantiations;
|
2015-09-15 01:26:36 +02:00
|
|
|
bool ShowFullFilenames;
|
2017-09-12 00:56:20 +02:00
|
|
|
bool ShowRegionSummary;
|
|
|
|
bool ShowInstantiationSummary;
|
2017-12-12 00:17:46 +01:00
|
|
|
bool ExportSummaryOnly;
|
2016-06-28 18:12:15 +02:00
|
|
|
OutputFormat Format;
|
2016-06-28 04:09:39 +02:00
|
|
|
std::string ShowOutputDirectory;
|
2016-07-16 00:44:57 +02:00
|
|
|
std::vector<std::string> DemanglerOpts;
|
2016-08-04 12:39:43 +02:00
|
|
|
uint32_t TabSize;
|
2016-08-24 16:27:23 +02:00
|
|
|
std::string ProjectTitle;
|
|
|
|
std::string CreatedTimeStr;
|
2018-01-05 17:15:07 +01:00
|
|
|
unsigned NumThreads;
|
2014-08-23 00:56:03 +02:00
|
|
|
|
|
|
|
/// \brief Change the output's stream color if the colors are enabled.
|
|
|
|
ColoredRawOstream colored_ostream(raw_ostream &OS,
|
|
|
|
raw_ostream::Colors Color) const {
|
|
|
|
return llvm::colored_ostream(OS, Color, Colors);
|
|
|
|
}
|
2016-06-28 18:12:12 +02:00
|
|
|
|
|
|
|
/// \brief Check if an output directory has been specified.
|
2016-07-16 00:44:54 +02:00
|
|
|
bool hasOutputDirectory() const { return !ShowOutputDirectory.empty(); }
|
2016-07-16 00:44:57 +02:00
|
|
|
|
|
|
|
/// \brief Check if a demangler has been specified.
|
|
|
|
bool hasDemangler() const { return !DemanglerOpts.empty(); }
|
2016-08-24 16:27:23 +02:00
|
|
|
|
|
|
|
/// \brief Check if a project title has been specified.
|
|
|
|
bool hasProjectTitle() const { return !ProjectTitle.empty(); }
|
|
|
|
|
|
|
|
/// \brief Check if the created time of the profile data file is available.
|
|
|
|
bool hasCreatedTime() const { return !CreatedTimeStr.empty(); }
|
2016-09-13 13:28:31 +02:00
|
|
|
|
|
|
|
/// \brief Get the LLVM version string.
|
|
|
|
std::string getLLVMVersionString() const {
|
|
|
|
std::string VersionString = "Generated by llvm-cov -- llvm version ";
|
|
|
|
VersionString += LLVM_VERSION_STRING;
|
|
|
|
return VersionString;
|
|
|
|
}
|
2014-08-23 00:56:03 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // LLVM_COV_COVERAGEVIEWOPTIONS_H
|