[ADT] Forward some StringRef::find overloads to std::string_view
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 15 Jan 2023 19:58:09 +0000 (20:58 +0100)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 15 Jan 2023 20:20:55 +0000 (21:20 +0100)
commit2f851f26ead0ea68c110584674555562af07d9e1
treeb0ded47bb1067d45862589de9cb2452a8efd2d57
parent931d04be2fc8f3f0505b43e64297f75d526cb42a
[ADT] Forward some StringRef::find overloads to std::string_view

These are identical in terms of functionality and performance (checked
libc++ and libstdc++). We could do the same for rfind, but that actually
has a off-by one on its position argument.

StringRef::find(StringRef) seems to be quite a bit more optimized than
the standard library one, so leave it alone.
llvm/include/llvm/ADT/StringRef.h
llvm/lib/Support/StringRef.cpp