mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Serialization] Fix crash in reporting missing implementationOnly modules
The diagnostic function crashed as it did not take into account the DebuggerSupport options as the site reporting the missing dependency did. In this context, missing implementation-only imported dependencies are ignored only if DebuggerSupport is set.
This commit is contained in:
@@ -738,9 +738,10 @@ void swift::serialization::diagnoseSerializedASTLoadFailure(
|
||||
std::copy_if(
|
||||
loadedModuleFile->getDependencies().begin(),
|
||||
loadedModuleFile->getDependencies().end(), std::back_inserter(missing),
|
||||
[&duplicates](const ModuleFile::Dependency &dependency) -> bool {
|
||||
[&duplicates, &Ctx](const ModuleFile::Dependency &dependency) -> bool {
|
||||
if (dependency.isLoaded() || dependency.isHeader() ||
|
||||
dependency.isImplementationOnly()) {
|
||||
(dependency.isImplementationOnly() &&
|
||||
Ctx.LangOpts.DebuggerSupport)) {
|
||||
return false;
|
||||
}
|
||||
return duplicates.insert(dependency.RawPath).second;
|
||||
|
||||
Reference in New Issue
Block a user