mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge remote-tracking branch 'origin/master' into master-next
This commit is contained in:
@@ -406,12 +406,8 @@ bool SerializedModuleLoader::maybeDiagnoseTargetMismatch(
|
||||
return false;
|
||||
StringRef filePath = directoryIterator->path();
|
||||
StringRef extension = llvm::sys::path::extension(filePath);
|
||||
auto fileType = file_types::lookupTypeForExtension(extension);
|
||||
// We also check for interfaces here, because the SerializedModuleLoader
|
||||
// is invoked after the ModuleInterfaceLoader; if the ModuleInterfaceLoader
|
||||
// handled interfaces separately, we could get duplicate diagnostics.
|
||||
if (fileType == file_types::TY_SwiftModuleFile
|
||||
|| fileType == file_types::TY_SwiftModuleInterfaceFile) {
|
||||
if (file_types::lookupTypeForExtension(extension) ==
|
||||
file_types::TY_SwiftModuleFile) {
|
||||
if (!foundArchs.empty())
|
||||
foundArchs += ", ";
|
||||
foundArchs += llvm::sys::path::stem(filePath).str();
|
||||
@@ -419,7 +415,7 @@ bool SerializedModuleLoader::maybeDiagnoseTargetMismatch(
|
||||
}
|
||||
|
||||
if (foundArchs.empty()) {
|
||||
// It is strange that there were no swiftmodules or swiftinterfaces here;
|
||||
// Maybe this swiftmodule directory only contains swiftinterfaces, or
|
||||
// maybe something else is going on. Regardless, we shouldn't emit a
|
||||
// possibly incorrect diagnostic.
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user