mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Caching] Give swiftmodule loaded from CAS a path identifier
Assign the path returned from dependency scanner for the module to the buffer identifier when loading modules from CAS. This fixes a warning in module trace file generation about invariant violation and also an assertion when generating swiftdeps file. rdar://122905379
This commit is contained in:
@@ -2603,7 +2603,7 @@ bool ExplicitCASModuleLoader::findModule(
|
||||
// that are not located on disk.
|
||||
auto moduleBuf = loadCachedCompileResultFromCacheKey(
|
||||
Impl.CAS, Impl.Cache, Ctx.Diags, moduleCASID,
|
||||
file_types::ID::TY_SwiftModuleFile);
|
||||
file_types::ID::TY_SwiftModuleFile, moduleInfo.modulePath);
|
||||
if (!moduleBuf) {
|
||||
// We cannot read the module content, diagnose.
|
||||
Ctx.Diags.diagnose(SourceLoc(), diag::error_opening_explicit_module_file,
|
||||
|
||||
Reference in New Issue
Block a user