Rename startswith to starts_with

LLVM is presumably moving towards `std::string_view` -
`StringRef::startswith` is deprecated on tip. `SmallString::startswith`
was just renamed there (maybe with some small deprecation inbetween, but
if so, we've missed it).

The `SmallString::startswith` references were moved to
`.str().starts_with()`, rather than adding the `starts_with` on
`stable/20230725` as we only had a few of them. Open to switching that
over if anyone feels strongly though.
This commit is contained in:
Ben Barham
2024-03-13 22:25:47 -07:00
parent 495a17743a
commit 9779c18da3
113 changed files with 276 additions and 276 deletions

View File

@@ -1294,9 +1294,9 @@ class ModuleInterfaceLoaderImpl {
} // end anonymous namespace
bool ModuleInterfaceCheckerImpl::isCached(StringRef DepPath) {
if (!CacheDir.empty() && DepPath.startswith(CacheDir))
if (!CacheDir.empty() && DepPath.starts_with(CacheDir))
return true;
return !PrebuiltCacheDir.empty() && DepPath.startswith(PrebuiltCacheDir);
return !PrebuiltCacheDir.empty() && DepPath.starts_with(PrebuiltCacheDir);
}
bool ModuleInterfaceLoader::isCached(StringRef DepPath) {