[llvm] 3fa409f - [ADT] Remove StringRef::equals (#98735)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 13 17:31:03 PDT 2024


Author: Kazu Hirata
Date: 2024-07-13T17:31:00-07:00
New Revision: 3fa409f2318ef790cc44836afe9a72830715ad84

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

LOG: [ADT] Remove StringRef::equals (#98735)

StringRef::equals has been deprecated since:

  commit de483ad513895c0adf7f21c7001c30f031998ea3
  Author: Kazu Hirata <kazu at google.com>
  Date:   Thu May 16 00:38:37 2024 -0700

Added: 
    

Modified: 
    llvm/include/llvm/ADT/StringRef.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/StringRef.h b/llvm/include/llvm/ADT/StringRef.h
index 2120c04530b2..049f22b03e46 100644
--- a/llvm/include/llvm/ADT/StringRef.h
+++ b/llvm/include/llvm/ADT/StringRef.h
@@ -159,14 +159,6 @@ namespace llvm {
       return StringRef(S, Length);
     }
 
-    /// equals - Check for string equality, this is more efficient than
-    /// compare() when the relative ordering of inequal strings isn't needed.
-    [[nodiscard]] LLVM_DEPRECATED("Use == instead",
-                                  "==") bool equals(StringRef RHS) const {
-      return (Length == RHS.Length &&
-              compareMemory(Data, RHS.Data, RHS.Length) == 0);
-    }
-
     /// Check for string equality, ignoring case.
     [[nodiscard]] bool equals_insensitive(StringRef RHS) const {
       return Length == RHS.Length && compare_insensitive(RHS) == 0;


        


More information about the llvm-commits mailing list