[llvm] [ADT] Use data() and size() within StringRef (NFC) (PR #113657)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 25 09:47:43 PDT 2024


https://github.com/kuhar commented:

> This makes it easier to replace Data and Length with
std::string_view in the future, which in turn allows us to forward
most of StringRef functions to the counterparts in std::string_view.

I don't understand how this will make future replacement with `std::string_view` easier. This PR only modifies the internal usage inside StringRef. Is the intention to use `std::string_view` as a data member inside `StringRef` or inherit from it?

https://github.com/llvm/llvm-project/pull/113657


More information about the llvm-commits mailing list