From: Vedant Kumar Date: Tue, 28 Jun 2016 16:12:15 +0000 (+0000) Subject: [llvm-cov] Rename ShowFormat to Format (NFC) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c5fab6a8fd63d0a46d408ff925ae43bf436dd622;p=llvm [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274026 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/llvm-cov/CodeCoverage.cpp b/tools/llvm-cov/CodeCoverage.cpp index 94b7c84b550..84318e3cd37 100644 --- a/tools/llvm-cov/CodeCoverage.cpp +++ b/tools/llvm-cov/CodeCoverage.cpp @@ -399,7 +399,7 @@ int CodeCoverageTool::show(int argc, const char **argv, cl::desc("Show function instantiations"), cl::cat(ViewCategory)); - cl::opt ShowFormat( + cl::opt Format( "format", cl::desc("Output format for line-based coverage reports"), cl::values(clEnumValN(CoverageViewOptions::OutputFormat::Text, "text", "Text output"), @@ -423,7 +423,7 @@ int CodeCoverageTool::show(int argc, const char **argv, ViewOpts.ShowLineStatsOrRegionMarkers = ShowBestLineRegionsCounts; ViewOpts.ShowExpandedRegions = ShowExpansions; ViewOpts.ShowFunctionInstantiations = ShowInstantiations; - ViewOpts.ShowFormat = ShowFormat; + ViewOpts.Format = Format; ViewOpts.ShowOutputDirectory = ShowOutputDirectory; if (ViewOpts.ShowOutputDirectory != "") { diff --git a/tools/llvm-cov/CoverageViewOptions.h b/tools/llvm-cov/CoverageViewOptions.h index ff23a619fde..19756e6edb8 100644 --- a/tools/llvm-cov/CoverageViewOptions.h +++ b/tools/llvm-cov/CoverageViewOptions.h @@ -29,7 +29,7 @@ struct CoverageViewOptions { bool ShowExpandedRegions; bool ShowFunctionInstantiations; bool ShowFullFilenames; - OutputFormat ShowFormat; + OutputFormat Format; std::string ShowOutputDirectory; /// \brief Change the output's stream color if the colors are enabled. diff --git a/tools/llvm-cov/SourceCoverageView.cpp b/tools/llvm-cov/SourceCoverageView.cpp index b71a35f8db0..d6de961c70b 100644 --- a/tools/llvm-cov/SourceCoverageView.cpp +++ b/tools/llvm-cov/SourceCoverageView.cpp @@ -97,7 +97,7 @@ std::unique_ptr SourceCoverageView::create(StringRef SourceName, const MemoryBuffer &File, const CoverageViewOptions &Options, coverage::CoverageData &&CoverageInfo) { - switch (Options.ShowFormat) { + switch (Options.Format) { case CoverageViewOptions::OutputFormat::Text: return llvm::make_unique(SourceName, File, Options, std::move(CoverageInfo));