@@ -557,19 +557,20 @@ bool ModuleDependenciesCacheDeserializer::readGraph(SwiftDependencyScanningServi
557557 if (!hasCurrentModule)
558558 llvm::report_fatal_error (" Unexpected CLANG_MODULE_DETAILS_NODE record" );
559559 cache.configureForContextHash (getContextHash ());
560- unsigned pcmOutputPathID, moduleMapPathID, contextHashID, commandLineArrayID,
561- fileDependenciesArrayID, capturedPCMArgsArrayID, CASFileSystemRootID,
562- clangIncludeTreeRootID, moduleCacheKeyID;
563- ClangModuleDetailsLayout::readRecord (Scratch, pcmOutputPathID, moduleMapPathID,
564- contextHashID, commandLineArrayID,
565- fileDependenciesArrayID,
566- capturedPCMArgsArrayID,
567- CASFileSystemRootID,
568- clangIncludeTreeRootID,
569- moduleCacheKeyID);
560+ unsigned pcmOutputPathID, mappedPCMPathID, moduleMapPathID, contextHashID,
561+ commandLineArrayID, fileDependenciesArrayID, capturedPCMArgsArrayID,
562+ CASFileSystemRootID, clangIncludeTreeRootID, moduleCacheKeyID;
563+ ClangModuleDetailsLayout::readRecord (
564+ Scratch, pcmOutputPathID, mappedPCMPathID, moduleMapPathID,
565+ contextHashID, commandLineArrayID, fileDependenciesArrayID,
566+ capturedPCMArgsArrayID, CASFileSystemRootID, clangIncludeTreeRootID,
567+ moduleCacheKeyID);
570568 auto pcmOutputPath = getIdentifier (pcmOutputPathID);
571569 if (!pcmOutputPath)
572570 llvm::report_fatal_error (" Bad pcm output path" );
571+ auto mappedPCMPath = getIdentifier (mappedPCMPathID);
572+ if (!mappedPCMPath)
573+ llvm::report_fatal_error (" Bad mapped pcm path" );
573574 auto moduleMapPath = getIdentifier (moduleMapPathID);
574575 if (!moduleMapPath)
575576 llvm::report_fatal_error (" Bad module map path" );
@@ -597,9 +598,9 @@ bool ModuleDependenciesCacheDeserializer::readGraph(SwiftDependencyScanningServi
597598
598599 // Form the dependencies storage object
599600 auto moduleDep = ModuleDependencyInfo::forClangModule (
600- *pcmOutputPath, *moduleMapPath , *contextHash , *commandLineArgs ,
601- *fileDependencies , *capturedPCMArgs , *rootFileSystemID ,
602- *clangIncludeTreeRoot, *moduleCacheKey);
601+ *pcmOutputPath, *mappedPCMPath , *moduleMapPath , *contextHash ,
602+ *commandLineArgs , *fileDependencies , *capturedPCMArgs ,
603+ *rootFileSystemID, * clangIncludeTreeRoot, *moduleCacheKey);
603604
604605 // Add dependencies of this module
605606 for (const auto &moduleName : *currentModuleImports)
@@ -1036,6 +1037,7 @@ void ModuleDependenciesCacheSerializer::writeModuleInfo(
10361037 ClangModuleDetailsLayout::emitRecord (
10371038 Out, ScratchRecord, AbbrCodes[ClangModuleDetailsLayout::Code],
10381039 getIdentifier (clangDeps->pcmOutputPath ),
1040+ getIdentifier (clangDeps->mappedPCMPath ),
10391041 getIdentifier (clangDeps->moduleMapFile ),
10401042 getIdentifier (clangDeps->contextHash ),
10411043 getArrayID (moduleID, ModuleIdentifierArrayKind::NonPathCommandLine),
@@ -1240,6 +1242,7 @@ void ModuleDependenciesCacheSerializer::collectStringsAndArrays(
12401242 auto clangDeps = dependencyInfo->getAsClangModule ();
12411243 assert (clangDeps);
12421244 addIdentifier (clangDeps->pcmOutputPath );
1245+ addIdentifier (clangDeps->mappedPCMPath );
12431246 addIdentifier (clangDeps->moduleMapFile );
12441247 addIdentifier (clangDeps->contextHash );
12451248 addStringArray (moduleID, ModuleIdentifierArrayKind::NonPathCommandLine,
0 commit comments