Prechádzať zdrojové kódy

[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
Vedant Kumar 9 rokov pred
rodič
commit
c5fab6a8fd

+ 2 - 2
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<CoverageViewOptions::OutputFormat> ShowFormat(
+  cl::opt<CoverageViewOptions::OutputFormat> 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 != "") {

+ 1 - 1
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.

+ 1 - 1
tools/llvm-cov/SourceCoverageView.cpp

@@ -97,7 +97,7 @@ std::unique_ptr<SourceCoverageView>
 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<SourceCoverageViewText>(SourceName, File, Options,
                                                      std::move(CoverageInfo));