mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Sema] Support -testable-import-module to load transitive non-public dependencies
When using the -testable-import-module argument to insert a testable import, there's no ImportDecl on which to show the diagnostics when loading transitive dependencies. Clean up the logic to still load dependencies in such a case.
This commit is contained in:
@@ -1479,10 +1479,9 @@ void SerializedASTFile::loadDependenciesForTestable(SourceLoc diagLoc) const {
|
||||
File.loadDependenciesForFileContext(this, diagLoc, /*forTestable=*/true);
|
||||
|
||||
if (status != serialization::Status::Valid) {
|
||||
if (diagLoc)
|
||||
serialization::diagnoseSerializedASTLoadFailureTransitive(
|
||||
getASTContext(), diagLoc, status, &File,
|
||||
getParentModule()->getName(), /*forTestable*/true);
|
||||
serialization::diagnoseSerializedASTLoadFailureTransitive(
|
||||
getASTContext(), diagLoc, status, &File,
|
||||
getParentModule()->getName(), /*forTestable*/true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user