Import error now mentions the target, not the arch

This commit is contained in:
Brent Royal-Gordon
2019-02-22 17:57:33 -08:00
parent c1cc51d1f3
commit 3f58a79174
6 changed files with 17 additions and 17 deletions

View File

@@ -109,7 +109,7 @@ std::error_code SerializedModuleLoader::findModuleFilesInDirectory(
ModuleDocBuffer);
}
bool SerializedModuleLoader::maybeDiagnoseArchitectureMismatch(
bool SerializedModuleLoader::maybeDiagnoseTargetMismatch(
SourceLoc sourceLocation, StringRef moduleName, StringRef archName,
StringRef directoryPath) {
llvm::vfs::FileSystem &fs = *Ctx.SourceMgr.getFileSystem();
@@ -139,7 +139,7 @@ bool SerializedModuleLoader::maybeDiagnoseArchitectureMismatch(
return false;
}
Ctx.Diags.diagnose(sourceLocation, diag::sema_no_import_arch, moduleName,
Ctx.Diags.diagnose(sourceLocation, diag::sema_no_import_target, moduleName,
archName, foundArchs);
return true;
}
@@ -208,8 +208,8 @@ SerializedModuleLoaderBase::findModule(AccessPathElem moduleID,
// We can only get here if all targetFileNamePairs failed with
// 'std::errc::no_such_file_or_directory'.
if (maybeDiagnoseArchitectureMismatch(moduleID.second,
moduleName, normalizedTarget.str(), currPath)) {
if (maybeDiagnoseTargetMismatch(moduleID.second, moduleName,
normalizedTarget.str(), currPath)) {
return false;
} else {
return None;