File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -753,8 +753,18 @@ CompilerInstance::openModuleDoc(const InputFile &input) {
753
753
return None;
754
754
}
755
755
756
+ // / Enable Swift concurrency on a per-target basis
757
+ static bool shouldImportConcurrencyByDefault (const llvm::Triple &target) {
758
+ if (target.isOSDarwin ())
759
+ return true ;
760
+ if (target.isOSWindows ())
761
+ return true ;
762
+ return false ;
763
+ }
764
+
756
765
bool CompilerInvocation::shouldImportSwiftConcurrency () const {
757
- return !getLangOptions ().DisableImplicitConcurrencyModuleImport &&
766
+ return shouldImportConcurrencyByDefault (getLangOptions ().Target ) &&
767
+ !getLangOptions ().DisableImplicitConcurrencyModuleImport &&
758
768
getFrontendOptions ().InputMode !=
759
769
FrontendOptions::ParseInputMode::SwiftModuleInterface;
760
770
}
You can’t perform that action at this time.
0 commit comments