mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Improve diagnostic for broken module interfaces
Currently, when a swiftinterface file fails to load, we emit the specific diagnostics for the failures, followed by a generic “failed to load module ‘Foo’” message. This PR improves that final diagnostic, particularly when the cause may be that the interface was emitted by a newer compiler using backwards-incompatible syntax.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
|
||||
namespace swift {
|
||||
|
||||
class ASTContext;
|
||||
class ModuleDecl;
|
||||
|
||||
/// Options for controlling the generation of the .swiftinterface output.
|
||||
@@ -45,8 +46,10 @@ struct ModuleInterfaceOptions {
|
||||
};
|
||||
|
||||
extern version::Version InterfaceFormatVersion;
|
||||
std::string getSwiftInterfaceCompilerVersionForCurrentCompiler(ASTContext &ctx);
|
||||
|
||||
llvm::Regex getSwiftInterfaceFormatVersionRegex();
|
||||
llvm::Regex getSwiftInterfaceCompilerVersionRegex();
|
||||
llvm::Regex getSwiftInterfaceModuleFlagsRegex();
|
||||
|
||||
/// Emit a stable module interface for \p M, which can be used by a client
|
||||
|
||||
Reference in New Issue
Block a user