mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Verify that _Concurrency *can* be imported on implicit import.
In case the compiler is used with concurrency features enabled (by-default or otherwise), and an older SDK is used which does not include the `_Concurrency` module, do not load this module implicitly. Instead, emit a diagnostic indicating that no such module is found. rdar://76967260
This commit is contained in:
@@ -529,6 +529,14 @@ public:
|
||||
return getMainModule()->getPrimarySourceFiles();
|
||||
}
|
||||
|
||||
/// Verify that if an implicit import of the `Concurrency` module if expected,
|
||||
/// it can actually be imported. Emit a warning, otherwise.
|
||||
void verifyImplicitConcurrencyImport();
|
||||
|
||||
/// Whether the Swift Concurrency support library can be imported
|
||||
/// i.e. if it can be found.
|
||||
bool canImportSwiftConcurrency() const;
|
||||
|
||||
/// Gets the SourceFile which is the primary input for this CompilerInstance.
|
||||
/// \returns the primary SourceFile, or nullptr if there is no primary input;
|
||||
/// if there are _multiple_ primary inputs, fails with an assertion.
|
||||
|
||||
Reference in New Issue
Block a user