[llvm] dfa3ead - [Analysis] Drop unnecessary const from return types (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 13 20:42:09 PST 2021


Author: Kazu Hirata
Date: 2021-02-13T20:41:38-08:00
New Revision: dfa3ead01ebf9ca0dc8c0c9c0694d187b227f269

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

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

Identified with readability-const-return-type.

Added: 
    

Modified: 
    llvm/include/llvm/Analysis/DDG.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Analysis/DDG.h b/llvm/include/llvm/Analysis/DDG.h
index 5317b6e7877e..51dd4a738f00 100644
--- a/llvm/include/llvm/Analysis/DDG.h
+++ b/llvm/include/llvm/Analysis/DDG.h
@@ -293,8 +293,8 @@ template <typename NodeType> class DependenceGraphInfo {
   /// 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;


        


More information about the llvm-commits mailing list