mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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:
@@ -289,7 +289,7 @@ Status ModuleFile::associateWithFileContext(FileUnit *file, SourceLoc diagLoc,
|
||||
// In Swift 6 mode, we do not inherit search paths from loaded non-SDK modules.
|
||||
if (!ctx.LangOpts.isSwiftVersionAtLeast(6) &&
|
||||
(SDKPath.empty() ||
|
||||
!Core->ModuleInputBuffer->getBufferIdentifier().startswith(SDKPath))) {
|
||||
!Core->ModuleInputBuffer->getBufferIdentifier().starts_with(SDKPath))) {
|
||||
for (const auto &searchPath : Core->SearchPaths) {
|
||||
ctx.addSearchPath(
|
||||
ctx.SearchPathOpts.SearchPathRemapper.remapPath(searchPath.Path),
|
||||
|
||||
Reference in New Issue
Block a user