Frontend: teach the compiler to use a backup directory to find .swiftinterface files to compile

This mechanism allows the compiler to use a backup interface file to build into a binary module when
a corresponding interface file from the SDK is failing for whatever reasons. This mechansim should be entirely opaque
to end users except several diagnostic messages communicating backup interfaces are used.

Part of rdar://77676064
This commit is contained in:
Xi Ge
2021-05-10 16:31:58 -07:00
parent 7487c12d05
commit b6cd513534
20 changed files with 303 additions and 74 deletions

View File

@@ -471,6 +471,9 @@ public:
/// Extract compiler arguments from an interface file buffer.
bool extractCompilerFlagsFromInterface(StringRef buffer, llvm::StringSaver &ArgSaver,
SmallVectorImpl<const char *> &SubArgs);
/// Extract the user module version number from an interface file.
llvm::VersionTuple extractUserModuleVersionFromInterface(StringRef moduleInterfacePath);
} // end namespace swift
#endif