Revert "Don't require a strict revision match in LLDB."

This reverts commit 3cc2831608.

The compiler's revision check has been relaxed since the feature was introduced
and so it's nos better to reduce the number of special code paths for LLDB in
the compiler to facilitate reasoning about it.

rdar://117824367
This commit is contained in:
Adrian Prantl
2023-12-06 10:57:24 -08:00
parent b60ed0b002
commit 5ef93af269
7 changed files with 15 additions and 22 deletions

View File

@@ -211,10 +211,10 @@ namespace path = llvm::sys::path;
static bool serializedASTLooksValid(const llvm::MemoryBuffer &buf,
bool requiresOSSAModules,
StringRef requiredSDK,
bool requiresRevisionMatch) {
auto VI = serialization::validateSerializedAST(
buf.getBuffer(), requiresOSSAModules, requiredSDK, requiresRevisionMatch);
StringRef requiredSDK) {
auto VI = serialization::validateSerializedAST(buf.getBuffer(),
requiresOSSAModules,
requiredSDK);
return VI.status == serialization::Status::Valid;
}
@@ -462,7 +462,6 @@ public:
LLVM_DEBUG(llvm::dbgs() << "Validating deps of " << path << "\n");
auto validationInfo = serialization::validateSerializedAST(
buf.getBuffer(), requiresOSSAModules, ctx.LangOpts.SDKName,
!ctx.LangOpts.DebuggerSupport,
/*ExtendedValidationInfo=*/nullptr, &allDeps);
if (validationInfo.status != serialization::Status::Valid) {
@@ -621,8 +620,7 @@ class ModuleInterfaceLoaderImpl {
// First, make sure the underlying module path exists and is valid.
auto modBuf = fs.getBufferForFile(fwd.underlyingModulePath);
if (!modBuf || !serializedASTLooksValid(*modBuf.get(), requiresOSSAModules,
ctx.LangOpts.SDKName,
!ctx.LangOpts.DebuggerSupport))
ctx.LangOpts.SDKName))
return false;
// Next, check the dependencies in the forwarding file.
@@ -2233,7 +2231,7 @@ bool ExplicitSwiftModuleLoader::canImportModule(
}
auto metaData = serialization::validateSerializedAST(
(*moduleBuf)->getBuffer(), Ctx.SILOpts.EnableOSSAModules,
Ctx.LangOpts.SDKName, !Ctx.LangOpts.DebuggerSupport);
Ctx.LangOpts.SDKName);
versionInfo->setVersion(metaData.userModuleVersion,
ModuleVersionSourceKind::SwiftBinaryModule);
return true;
@@ -2564,7 +2562,7 @@ bool ExplicitCASModuleLoader::canImportModule(
}
auto metaData = serialization::validateSerializedAST(
(*moduleBuf)->getBuffer(), Ctx.SILOpts.EnableOSSAModules,
Ctx.LangOpts.SDKName, !Ctx.LangOpts.DebuggerSupport);
Ctx.LangOpts.SDKName);
versionInfo->setVersion(metaData.userModuleVersion,
ModuleVersionSourceKind::SwiftBinaryModule);
return true;