Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADT] Remove StringRef::equals #98735

Merged

Conversation

kazutakahirata
Copy link
Contributor

StringRef::equals has been deprecated since:

commit de483ad
Author: Kazu Hirata [email protected]
Date: Thu May 16 00:38:37 2024 -0700

@llvmbot
Copy link
Collaborator

llvmbot commented Jul 13, 2024

@llvm/pr-subscribers-llvm-adt

Author: Kazu Hirata (kazutakahirata)

Changes

StringRef::equals has been deprecated since:

commit de483ad
Author: Kazu Hirata <[email protected]>
Date: Thu May 16 00:38:37 2024 -0700


Full diff: https://github.com/llvm/llvm-project/pull/98735.diff

1 Files Affected:

  • (modified) llvm/include/llvm/ADT/StringRef.h (-8)
diff --git a/llvm/include/llvm/ADT/StringRef.h b/llvm/include/llvm/ADT/StringRef.h
index 2120c04530b23..049f22b03e46e 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;

StringRef::equals has been deprecated since:

  commit de483ad
  Author: Kazu Hirata <[email protected]>
  Date:   Thu May 16 00:38:37 2024 -0700
@kazutakahirata kazutakahirata force-pushed the cleanup_StringRef_equals_remove branch from 6b0f48f to 7f2e5f4 Compare July 13, 2024 20:59
@kazutakahirata kazutakahirata merged commit 3fa409f into llvm:main Jul 14, 2024
3 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_StringRef_equals_remove branch July 14, 2024 00:31
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 14, 2024

LLVM Buildbot has detected a new failure on builder clang-solaris11-sparcv9 running on solaris11-sparcv9 while building llvm at step 4 "build stage 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/13/builds/712

Here is the relevant piece of the build log for the reference:

Step 4 (build stage 1) failure: 'ninja -j8' (failure)
...
[103/4068] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/WithColor.cpp.o
[104/4068] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Z3Solver.cpp.o
[105/4068] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/xxhash.cpp.o
[106/4068] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/raw_ostream.cpp.o
[107/4068] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/YAMLTraits.cpp.o
[108/4068] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DynamicLibrary.cpp.o
[109/4068] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/raw_socket_stream.cpp.o
[110/4068] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/YAMLParser.cpp.o
[111/4068] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/RWMutex.cpp.o
[112/4068] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Path.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/Path.cpp.o 
/opt/llvm/17/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/lib/Support -I/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/llvm/lib/Support -I/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/include -I/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/llvm/include -I/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/llvm/include/llvm/Support/Solaris -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Werror=global-constructors  -O -DNDEBUG -UNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/Path.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/Path.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/Path.cpp.o -c /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/llvm/lib/Support/Path.cpp
In file included from /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/llvm/lib/Support/Path.cpp:1200:
/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/llvm/lib/Support/Unix/Path.inc:519:18: error: no member named 'equals' in 'llvm::StringRef'
  519 |   return !fstype.equals("nfs");
      |           ~~~~~~ ^
1 error generated.
[113/4068] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Memory.cpp.o
[114/4068] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Process.cpp.o
[115/4068] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Threading.cpp.o
[116/4068] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Program.cpp.o
[117/4068] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Signals.cpp.o
[118/4068] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/VirtualFileSystem.cpp.o
[119/4068] Building CXX object lib/TableGen/CMakeFiles/LLVMTableGen.dir/DetailedRecordsBackend.cpp.o
ninja: build stopped: subcommand failed.

aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
StringRef::equals has been deprecated since:

  commit de483ad
  Author: Kazu Hirata <[email protected]>
  Date:   Thu May 16 00:38:37 2024 -0700
aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 16, 2024
StringRef::equals has been deprecated since:

  commit de483ad
  Author: Kazu Hirata <[email protected]>
  Date:   Thu May 16 00:38:37 2024 -0700
Zentrik added a commit to Zentrik/julia that referenced this pull request Aug 31, 2024
Zentrik added a commit to Zentrik/julia that referenced this pull request Sep 27, 2024
Zentrik added a commit to Zentrik/julia that referenced this pull request Oct 3, 2024
Zentrik added a commit to Zentrik/julia that referenced this pull request Oct 9, 2024
maleadt pushed a commit to Zentrik/julia that referenced this pull request Oct 11, 2024
Zentrik added a commit to Zentrik/julia that referenced this pull request Oct 12, 2024
Zentrik added a commit to Zentrik/julia that referenced this pull request Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants