OSDN Git Service

[llvm-cov] Make a method name more accurate (NFC)
authorVedant Kumar <vsk@apple.com>
Thu, 15 Sep 2016 04:45:59 +0000 (04:45 +0000)
committerVedant Kumar <vsk@apple.com>
Thu, 15 Sep 2016 04:45:59 +0000 (04:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281581 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-cov/SourceCoverageView.cpp
tools/llvm-cov/SourceCoverageView.h
tools/llvm-cov/SourceCoverageViewHTML.cpp
tools/llvm-cov/SourceCoverageViewHTML.h
tools/llvm-cov/SourceCoverageViewText.cpp
tools/llvm-cov/SourceCoverageViewText.h

index ad6aa66..8cf17f4 100644 (file)
@@ -169,7 +169,7 @@ void SourceCoverageView::addInstantiation(
 void SourceCoverageView::print(raw_ostream &OS, bool WholeFile,
                                bool ShowSourceName, unsigned ViewDepth) {
   if (WholeFile && getOptions().hasOutputDirectory())
-    renderCellInTitle(OS, "Coverage Report");
+    renderTitle(OS, "Coverage Report");
 
   renderViewHeader(OS);
 
index 68e8251..129c590 100644 (file)
@@ -240,9 +240,9 @@ protected:
   virtual void renderInstantiationView(raw_ostream &OS, InstantiationView &ISV,
                                        unsigned ViewDepth) = 0;
 
-  /// \brief Render the project title, the report title \p CellText and the
-  /// created time for the view.
-  virtual void renderCellInTitle(raw_ostream &OS, StringRef CellText) = 0;
+  /// \brief Render \p Title, a project title if one is available, and the
+  /// created time.
+  virtual void renderTitle(raw_ostream &OS, StringRef CellText) = 0;
 
   /// \brief Render the table header for a given source file.
   virtual void renderTableHeader(raw_ostream &OS, unsigned FirstUncoveredLineNo,
index 375b0de..2fef1b4 100644 (file)
@@ -588,11 +588,10 @@ void SourceCoverageViewHTML::renderInstantiationView(raw_ostream &OS,
   OS << EndExpansionDiv;
 }
 
-void SourceCoverageViewHTML::renderCellInTitle(raw_ostream &OS,
-                                               StringRef CellText) {
+void SourceCoverageViewHTML::renderTitle(raw_ostream &OS, StringRef Title) {
   if (getOptions().hasProjectTitle())
     OS << tag(ProjectTitleTag, escape(getOptions().ProjectTitle, getOptions()));
-  OS << tag(ReportTitleTag, escape(CellText, getOptions()));
+  OS << tag(ReportTitleTag, escape(Title, getOptions()));
   if (getOptions().hasCreatedTime())
     OS << tag(CreatedTimeTag,
               escape(getOptions().CreatedTimeStr, getOptions()));
index b97c180..ad4b2b8 100644 (file)
@@ -78,7 +78,7 @@ class SourceCoverageViewHTML : public SourceCoverageView {
   void renderRegionMarkers(raw_ostream &OS, CoverageSegmentArray Segments,
                            unsigned ViewDepth) override;
 
-  void renderCellInTitle(raw_ostream &OS, StringRef CellText) override;
+  void renderTitle(raw_ostream &OS, StringRef Title) override;
 
   void renderTableHeader(raw_ostream &OS, unsigned FirstUncoveredLineNo,
                          unsigned IndentLevel) override;
index 16bbe56..51c6463 100644 (file)
@@ -218,13 +218,12 @@ void SourceCoverageViewText::renderInstantiationView(raw_ostream &OS,
   ISV.View->print(OS, /*WholeFile=*/false, /*ShowSourceName=*/true, ViewDepth);
 }
 
-void SourceCoverageViewText::renderCellInTitle(raw_ostream &OS,
-                                               StringRef CellText) {
+void SourceCoverageViewText::renderTitle(raw_ostream &OS, StringRef Title) {
   if (getOptions().hasProjectTitle())
     getOptions().colored_ostream(OS, raw_ostream::CYAN)
         << getOptions().ProjectTitle << "\n";
 
-  getOptions().colored_ostream(OS, raw_ostream::CYAN) << CellText << "\n";
+  getOptions().colored_ostream(OS, raw_ostream::CYAN) << Title << "\n";
 
   if (getOptions().hasCreatedTime())
     getOptions().colored_ostream(OS, raw_ostream::CYAN)
index 7fdeef5..3968aa7 100644 (file)
@@ -71,7 +71,7 @@ class SourceCoverageViewText : public SourceCoverageView {
   void renderRegionMarkers(raw_ostream &OS, CoverageSegmentArray Segments,
                            unsigned ViewDepth) override;
 
-  void renderCellInTitle(raw_ostream &OS, StringRef CellText) override;
+  void renderTitle(raw_ostream &OS, StringRef Title) override;
 
   void renderTableHeader(raw_ostream &OS, unsigned FirstUncoveredLineNo,
                          unsigned IndentLevel) override;