Merge branch 'main' into rebranch

Conflicts:
      lib/Basic/Platform.cpp

```
diff --git a/lib/Basic/Platform.cpp b/lib/Basic/Platform.cpp
index 240edfa144a..1797c87635f 100644
--- a/lib/Basic/Platform.cpp
+++ b/lib/Basic/Platform.cpp
@@ -200,10 +200,7 @@ StringRef swift::getPlatformNameForTriple(const llvm::Triple &triple) {
   case llvm::Triple::CUDA:
   case llvm::Triple::DragonFly:
   case llvm::Triple::DriverKit:
-<<<<<<< HEAD
   case llvm::Triple::ELFIAMCU:
-=======
->>>>>>> main
   case llvm::Triple::Emscripten:
   case llvm::Triple::Fuchsia:
   case llvm::Triple::HermitCore:
```
This commit is contained in:
Nate Chandler
2024-04-17 13:29:54 -07:00
212 changed files with 3158 additions and 413 deletions

View File

@@ -191,6 +191,7 @@ UPCOMING_FEATURE(GlobalConcurrency, 412, 6)
UPCOMING_FEATURE(InferSendableFromCaptures, 418, 6)
UPCOMING_FEATURE(ImplicitOpenExistentials, 352, 6)
UPCOMING_FEATURE(RegionBasedIsolation, 414, 6)
UPCOMING_FEATURE(DynamicActorIsolation, 423, 6)
UPCOMING_FEATURE(MoveOnlyPartialConsumption, 429, 6)
// Swift 7
@@ -354,11 +355,6 @@ EXPERIMENTAL_FEATURE(GroupActorErrors, true)
// Allow for the 'transferring' keyword to be applied to arguments and results.
EXPERIMENTAL_FEATURE(TransferringArgsAndResults, true)
// Enable `@preconcurrency` attribute on protocol conformances and runtime checks
// of actor isolation in @obj thunks and arguments of APIs that haven't yet adopted
// strict concurrency checking.
EXPERIMENTAL_FEATURE(DynamicActorIsolation, false)
// Allow for `switch` of noncopyable values to be borrowing or consuming.
EXPERIMENTAL_FEATURE(BorrowingSwitch, true)

View File

@@ -593,6 +593,9 @@ namespace swift {
/// type-checking, SIL verification, and IR emission,
bool BypassResilienceChecks = false;
/// Disables `DynamicActorIsolation` feature.
bool DisableDynamicActorIsolation = false;
/// Whether or not to allow experimental features that are only available
/// in "production".
#ifdef NDEBUG
@@ -605,6 +608,11 @@ namespace swift {
return ActiveConcurrencyModel == ConcurrencyModel::TaskToThread;
}
bool isDynamicActorIsolationCheckingEnabled() const {
return !DisableDynamicActorIsolation &&
hasFeature(Feature::DynamicActorIsolation);
}
LangOptions();
/// Sets the target we are building for and updates platform conditions
@@ -627,6 +635,8 @@ namespace swift {
return Target.getiOSVersion();
} else if (Target.isWatchOS()) {
return Target.getOSVersion();
} else if (Target.isXROS()) {
return Target.getOSVersion();
}
return llvm::VersionTuple(/*Major=*/0, /*Minor=*/0, /*Subminor=*/0);
}

View File

@@ -33,7 +33,9 @@ namespace swift {
TvOS,
TvOSSimulator,
WatchOS,
WatchOSSimulator
WatchOSSimulator,
VisionOS,
VisionOSSimulator
};
/// Returns true if the given triple represents iOS running in a simulator.
@@ -48,6 +50,9 @@ namespace swift {
/// Returns true if the given triple represents a macCatalyst environment.
bool tripleIsMacCatalystEnvironment(const llvm::Triple &triple);
/// Returns true if the given triple represents visionOS running in a simulator.
bool tripleIsVisionSimulator(const llvm::Triple &triple);
/// Determine whether the triple infers the "simulator" environment.
bool tripleInfersSimulatorEnvironment(const llvm::Triple &triple);