mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[region-isolation] Enable region isolation by default with strict-concurrency.
I added a disable flag -disable-region-based-isolation-with-strict-concurrency so that we do not need to update the current tests. It is only available when asserts are enabled to ensure users cannot use it. rdar://125918028
This commit is contained in:
@@ -1060,6 +1060,16 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
if (Opts.StrictConcurrencyLevel == StrictConcurrency::Complete) {
|
||||
Opts.enableFeature(Feature::IsolatedDefaultValues);
|
||||
Opts.enableFeature(Feature::GlobalConcurrency);
|
||||
|
||||
// If asserts are enabled, allow for region based isolation to be disabled
|
||||
// with a flag. This is intended only to be used with tests.
|
||||
bool enableRegionIsolation = true;
|
||||
#ifndef NDEBUG
|
||||
enableRegionIsolation =
|
||||
!Args.hasArg(OPT_disable_strict_concurrency_region_based_isolation);
|
||||
#endif
|
||||
if (enableRegionIsolation)
|
||||
Opts.enableFeature(Feature::RegionBasedIsolation);
|
||||
}
|
||||
|
||||
Opts.WarnImplicitOverrides =
|
||||
|
||||
Reference in New Issue
Block a user