forked from OSchip/llvm-project
[llvm-cov] Rename ShowFormat to Format (NFC)
This makes it a bit more generic, in case we want to emit summary reports in different formats in the future. llvm-svn: 274026
This commit is contained in:
parent
de717e655b
commit
ebe8401638
|
@ -399,7 +399,7 @@ int CodeCoverageTool::show(int argc, const char **argv,
|
||||||
cl::desc("Show function instantiations"),
|
cl::desc("Show function instantiations"),
|
||||||
cl::cat(ViewCategory));
|
cl::cat(ViewCategory));
|
||||||
|
|
||||||
cl::opt<CoverageViewOptions::OutputFormat> ShowFormat(
|
cl::opt<CoverageViewOptions::OutputFormat> Format(
|
||||||
"format", cl::desc("Output format for line-based coverage reports"),
|
"format", cl::desc("Output format for line-based coverage reports"),
|
||||||
cl::values(clEnumValN(CoverageViewOptions::OutputFormat::Text, "text",
|
cl::values(clEnumValN(CoverageViewOptions::OutputFormat::Text, "text",
|
||||||
"Text output"),
|
"Text output"),
|
||||||
|
@ -423,7 +423,7 @@ int CodeCoverageTool::show(int argc, const char **argv,
|
||||||
ViewOpts.ShowLineStatsOrRegionMarkers = ShowBestLineRegionsCounts;
|
ViewOpts.ShowLineStatsOrRegionMarkers = ShowBestLineRegionsCounts;
|
||||||
ViewOpts.ShowExpandedRegions = ShowExpansions;
|
ViewOpts.ShowExpandedRegions = ShowExpansions;
|
||||||
ViewOpts.ShowFunctionInstantiations = ShowInstantiations;
|
ViewOpts.ShowFunctionInstantiations = ShowInstantiations;
|
||||||
ViewOpts.ShowFormat = ShowFormat;
|
ViewOpts.Format = Format;
|
||||||
ViewOpts.ShowOutputDirectory = ShowOutputDirectory;
|
ViewOpts.ShowOutputDirectory = ShowOutputDirectory;
|
||||||
|
|
||||||
if (ViewOpts.ShowOutputDirectory != "") {
|
if (ViewOpts.ShowOutputDirectory != "") {
|
||||||
|
|
|
@ -29,7 +29,7 @@ struct CoverageViewOptions {
|
||||||
bool ShowExpandedRegions;
|
bool ShowExpandedRegions;
|
||||||
bool ShowFunctionInstantiations;
|
bool ShowFunctionInstantiations;
|
||||||
bool ShowFullFilenames;
|
bool ShowFullFilenames;
|
||||||
OutputFormat ShowFormat;
|
OutputFormat Format;
|
||||||
std::string ShowOutputDirectory;
|
std::string ShowOutputDirectory;
|
||||||
|
|
||||||
/// \brief Change the output's stream color if the colors are enabled.
|
/// \brief Change the output's stream color if the colors are enabled.
|
||||||
|
|
|
@ -97,7 +97,7 @@ std::unique_ptr<SourceCoverageView>
|
||||||
SourceCoverageView::create(StringRef SourceName, const MemoryBuffer &File,
|
SourceCoverageView::create(StringRef SourceName, const MemoryBuffer &File,
|
||||||
const CoverageViewOptions &Options,
|
const CoverageViewOptions &Options,
|
||||||
coverage::CoverageData &&CoverageInfo) {
|
coverage::CoverageData &&CoverageInfo) {
|
||||||
switch (Options.ShowFormat) {
|
switch (Options.Format) {
|
||||||
case CoverageViewOptions::OutputFormat::Text:
|
case CoverageViewOptions::OutputFormat::Text:
|
||||||
return llvm::make_unique<SourceCoverageViewText>(SourceName, File, Options,
|
return llvm::make_unique<SourceCoverageViewText>(SourceName, File, Options,
|
||||||
std::move(CoverageInfo));
|
std::move(CoverageInfo));
|
||||||
|
|
Loading…
Reference in New Issue