mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ModuleInterface: Print imports with @preconcurrency in swiftinterface files.
When a module has been imported `@preconcurrency` in source, when it is printed in a `swiftinterface` file it should be printed along with the attribute to ensure that type checking of the module's public declarations behaves consistently. This fix is a little unsatisfying because it adds another a linear scan over all imports in the source for each printed import. This should be improved, but it can be done later. Resolves rdar://136857313.
This commit is contained in:
@@ -1915,6 +1915,14 @@ void SerializedASTFile::lookupImportedSPIGroups(
|
||||
}
|
||||
}
|
||||
|
||||
bool SerializedASTFile::isModuleImportedPreconcurrency(
|
||||
const ModuleDecl *importedModule) const {
|
||||
// This method should only be queried during `-merge-modules` jobs, which are
|
||||
// deprecated, and thus no effort has been made to answer this query correctly
|
||||
// (@preconcurrency is not encoded on imports in serialized modules).
|
||||
return false;
|
||||
}
|
||||
|
||||
std::optional<CommentInfo>
|
||||
SerializedASTFile::getCommentForDecl(const Decl *D) const {
|
||||
return File.getCommentForDecl(D);
|
||||
|
||||
Reference in New Issue
Block a user