[all-commits] [llvm/llvm-project] 7ee628: [Support] Use StringRef::operator== instead of Str...
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Sat May 4 08:47:10 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7ee6288312e8cde8d2e8ee48f87bbab966a89247
https://github.com/llvm/llvm-project/commit/7ee6288312e8cde8d2e8ee48f87bbab966a89247
Author: Kazu Hirata <kazu at google.com>
Date: 2024-05-04 (Sat, 04 May 2024)
Changed paths:
M llvm/include/llvm/Support/VirtualFileSystem.h
M llvm/include/llvm/Support/YAMLTraits.h
M llvm/lib/Support/APFloat.cpp
M llvm/lib/Support/CodeGenCoverage.cpp
M llvm/lib/Support/FileCollector.cpp
M llvm/lib/Support/JSON.cpp
M llvm/lib/Support/VirtualFileSystem.cpp
M llvm/lib/Support/YAMLTraits.cpp
Log Message:
-----------
[Support] Use StringRef::operator== instead of StringRef::equals (NFC) (#91042)
I'm planning to remove StringRef::equals in favor of
StringRef::operator==.
- StringRef::operator== outnumbers StringRef::equals by a factor of 25
under llvm/ in terms of their usage.
- The elimination of StringRef::equals brings StringRef closer to
std::string_view, which has operator== but not equals.
- S == "foo" is more readable than S.equals("foo"), especially for
!Long.Expression.equals("str") vs Long.Expression != "str".
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list