[all-commits] [llvm/llvm-project] 774b7e: [ADT] Reimplement operator==(StringRef, StringRef)...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Sun May 5 20:08:28 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 774b7eb7bacceaca3986fc73a236c3cd44f28599
      https://github.com/llvm/llvm-project/commit/774b7eb7bacceaca3986fc73a236c3cd44f28599
  Author: Kazu Hirata <kazu at google.com>
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
    M llvm/include/llvm/ADT/StringRef.h

  Log Message:
  -----------
  [ADT] Reimplement operator==(StringRef, StringRef) (NFC) (#91139)

I'm planning to deprecate and eventually remove StringRef::equals in
favor of operator==.  This patch reimplements operator== without using
StringRef::equals.

I'm not sure if there is a good way to make StringRef::compareMemory
available to operator==, which is not a member function.  "friend"
works to some extent but breaks corner cases, which is why I've chosen
to "inline" compareMemory.



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