mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Remove an old, horrible compatibility hack in the _Concurrency module
The concurrency module was getting an implicit `-disable-availability-checking` as a workaround from the Swift 5.6 days. Remove it, because it causes problems with the new `Failure` type in the async for..in loop. Fixes a back-deployment issue with async algorithms in the _Concurrency library that use the async for..in loop.
This commit is contained in:
@@ -470,13 +470,6 @@ static void SaveModuleInterfaceArgs(ModuleInterfaceOptions &Opts,
|
||||
interleave(RenderedArgs,
|
||||
[&](const char *Argument) { PrintArg(OS, Argument, StringRef()); },
|
||||
[&] { OS << " "; });
|
||||
|
||||
// Backward-compatibility hack: disable availability checking in the
|
||||
// _Concurrency module, so that older (Swift 5.5) compilers that did not
|
||||
// support back deployment of concurrency do not complain about 'async'
|
||||
// with older availability.
|
||||
if (FOpts.ModuleName == "_Concurrency")
|
||||
OS << " -disable-availability-checking";
|
||||
}
|
||||
{
|
||||
llvm::raw_string_ostream OS(Opts.IgnorablePrivateFlags);
|
||||
|
||||
Reference in New Issue
Block a user