Merge remote-tracking branch 'origin/main' into rebranch

This commit is contained in:
swift-ci
2022-07-02 17:03:37 -07:00
79 changed files with 1328 additions and 348 deletions

View File

@@ -1128,6 +1128,9 @@ swift::extractUserModuleVersionFromInterface(StringRef moduleInterfacePath) {
bool SerializedModuleLoaderBase::canImportModule(ImportPath::Module path,
llvm::VersionTuple version,
bool underlyingVersion) {
// FIXME: Swift submodules?
if (path.hasSubmodule())
return false;
// If underlying version is specified, this should be handled by Clang importer.
if (!version.empty() && underlyingVersion)
return false;
@@ -1148,7 +1151,6 @@ bool SerializedModuleLoaderBase::canImportModule(ImportPath::Module path,
unusedModuleDocBuffer = &moduleDocBuffer;
}
// FIXME: Swift submodules?
auto mID = path[0];
auto found = findModule(mID, unusedModuleInterfacePath, unusedModuleBuffer,
unusedModuleDocBuffer, unusedModuleSourceInfoBuffer,
@@ -1188,10 +1190,12 @@ bool SerializedModuleLoaderBase::canImportModule(ImportPath::Module path,
bool MemoryBufferSerializedModuleLoader::canImportModule(
ImportPath::Module path, llvm::VersionTuple version,
bool underlyingVersion) {
// FIXME: Swift submodules?
if (path.hasSubmodule())
return false;
// If underlying version is specified, this should be handled by Clang importer.
if (!version.empty() && underlyingVersion)
return false;
// FIXME: Swift submodules?
auto mID = path[0];
auto mIt = MemoryBuffers.find(mID.Item.str());
if (mIt == MemoryBuffers.end())