[Analysis] Drop unnecessary const from return types (NFC)
authorKazu Hirata <kazu@google.com>
Sun, 14 Feb 2021 04:41:38 +0000 (20:41 -0800)
committerKazu Hirata <kazu@google.com>
Sun, 14 Feb 2021 04:41:38 +0000 (20:41 -0800)
Identified with readability-const-return-type.

llvm/include/llvm/Analysis/DDG.h

index 5317b6e..51dd4a7 100644 (file)
@@ -293,8 +293,8 @@ public:
   /// Return a string representing the type of dependence that the dependence
   /// analysis identified between the two given nodes. This function assumes
   /// that there is a memory dependence between the given two nodes.
-  const std::string getDependenceString(const NodeType &Src,
-                                        const NodeType &Dst) const;
+  std::string getDependenceString(const NodeType &Src,
+                                  const NodeType &Dst) const;
 
 protected:
   // Name of the graph.
@@ -470,7 +470,7 @@ bool DependenceGraphInfo<NodeType>::getDependencies(
 }
 
 template <typename NodeType>
-const std::string
+std::string
 DependenceGraphInfo<NodeType>::getDependenceString(const NodeType &Src,
                                                    const NodeType &Dst) const {
   std::string Str;