mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #36928 from eeckstein/module-build-error-message
ModuleInterfaceBuilder: give a more specific error message in case of a compiler mismatch
This commit is contained in:
@@ -210,9 +210,14 @@ bool ModuleInterfaceBuilder::buildSwiftModuleInternal(
|
||||
getSwiftInterfaceCompilerVersionForCurrentCompiler(
|
||||
SubInstance.getASTContext());
|
||||
StringRef emittedByCompiler = info.CompilerVersion;
|
||||
diagnose(diag::module_interface_build_failed, isTypeChecking,
|
||||
moduleName, emittedByCompiler == builtByCompiler,
|
||||
emittedByCompiler, builtByCompiler);
|
||||
if (!isTypeChecking && emittedByCompiler != builtByCompiler) {
|
||||
diagnose(diag::module_interface_build_failed_mismatching_compiler,
|
||||
moduleName, emittedByCompiler, builtByCompiler);
|
||||
} else {
|
||||
diagnose(diag::module_interface_build_failed, isTypeChecking,
|
||||
moduleName, emittedByCompiler == builtByCompiler,
|
||||
emittedByCompiler, builtByCompiler);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user