[llvm] 9dc62d1 - [PGO] Drop unnecessary const from return types (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 11 23:32:08 PST 2021


Author: Kazu Hirata
Date: 2021-02-11T23:31:29-08:00
New Revision: 9dc62d1dc1479d4f831aebebe8a849061a5103a2

URL: https://github.com/llvm/llvm-project/commit/9dc62d1dc1479d4f831aebebe8a849061a5103a2
DIFF: https://github.com/llvm/llvm-project/commit/9dc62d1dc1479d4f831aebebe8a849061a5103a2.diff

LOG: [PGO] Drop unnecessary const from return types (NFC)

Added: 
    

Modified: 
    llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
index 25ddf2043ba6..0534830f0f33 100644
--- a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
+++ b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
@@ -529,7 +529,7 @@ struct PGOEdge {
       : SrcBB(Src), DestBB(Dest), Weight(W) {}
 
   // Return the information string of an edge.
-  const std::string infoString() const {
+  std::string infoString() const {
     return (Twine(Removed ? "-" : " ") + (InMST ? " " : "*") +
             (IsCritical ? "c" : " ") + "  W=" + Twine(Weight)).str();
   }
@@ -544,7 +544,7 @@ struct BBInfo {
   BBInfo(unsigned IX) : Group(this), Index(IX) {}
 
   // Return the information string of this object.
-  const std::string infoString() const {
+  std::string infoString() const {
     return (Twine("Index=") + Twine(Index)).str();
   }
 
@@ -987,7 +987,7 @@ struct PGOUseEdge : public PGOEdge {
   }
 
   // Return the information string for this object.
-  const std::string infoString() const {
+  std::string infoString() const {
     if (!CountValid)
       return PGOEdge::infoString();
     return (Twine(PGOEdge::infoString()) + "  Count=" + Twine(CountValue))
@@ -1018,7 +1018,7 @@ struct UseBBInfo : public BBInfo {
   }
 
   // Return the information string of this object.
-  const std::string infoString() const {
+  std::string infoString() const {
     if (!CountValid)
       return BBInfo::infoString();
     return (Twine(BBInfo::infoString()) + "  Count=" + Twine(CountValue)).str();
@@ -1147,7 +1147,7 @@ class PGOUseFunc {
   void setEdgeCount(DirectEdges &Edges, uint64_t Value);
 
   // Return FuncName string;
-  const std::string getFuncName() const { return FuncInfo.FuncName; }
+  std::string getFuncName() const { return FuncInfo.FuncName; }
 
   // Set the hot/cold inline hints based on the count values.
   // FIXME: This function should be removed once the functionality in


        


More information about the llvm-commits mailing list