[all-commits] [llvm/llvm-project] 89b5d8: [ADT] Use std::string_view inside StringRef (#113775)

Kazu Hirata via All-commits all-commits at lists.llvm.org
Sat Oct 26 19:14:19 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 89b5d88fb81362b4fb2f833790aa40b7eaa186da
      https://github.com/llvm/llvm-project/commit/89b5d88fb81362b4fb2f833790aa40b7eaa186da
  Author: Kazu Hirata <kazu at google.com>
  Date:   2024-10-26 (Sat, 26 Oct 2024)

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

  Log Message:
  -----------
  [ADT] Use std::string_view inside StringRef (#113775)

This patch makes minimum changes to replace Data and Length with an
instance of std::string_view.

Previously, I opted for public inheritance (#113752), but I
encountered a lot of errors from gcc stemming from ambiguity between
std::string_view and StringRef.

The composition approach in this patch gives us greater control at the
expense of forwarder functions.



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