@@ -557,19 +557,20 @@ bool ModuleDependenciesCacheDeserializer::readGraph(SwiftDependencyScanningServi
557
557
if (!hasCurrentModule)
558
558
llvm::report_fatal_error (" Unexpected CLANG_MODULE_DETAILS_NODE record" );
559
559
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);
570
568
auto pcmOutputPath = getIdentifier (pcmOutputPathID);
571
569
if (!pcmOutputPath)
572
570
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" );
573
574
auto moduleMapPath = getIdentifier (moduleMapPathID);
574
575
if (!moduleMapPath)
575
576
llvm::report_fatal_error (" Bad module map path" );
@@ -597,9 +598,9 @@ bool ModuleDependenciesCacheDeserializer::readGraph(SwiftDependencyScanningServi
597
598
598
599
// Form the dependencies storage object
599
600
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);
603
604
604
605
// Add dependencies of this module
605
606
for (const auto &moduleName : *currentModuleImports)
@@ -1036,6 +1037,7 @@ void ModuleDependenciesCacheSerializer::writeModuleInfo(
1036
1037
ClangModuleDetailsLayout::emitRecord (
1037
1038
Out, ScratchRecord, AbbrCodes[ClangModuleDetailsLayout::Code],
1038
1039
getIdentifier (clangDeps->pcmOutputPath ),
1040
+ getIdentifier (clangDeps->mappedPCMPath ),
1039
1041
getIdentifier (clangDeps->moduleMapFile ),
1040
1042
getIdentifier (clangDeps->contextHash ),
1041
1043
getArrayID (moduleID, ModuleIdentifierArrayKind::NonPathCommandLine),
@@ -1240,6 +1242,7 @@ void ModuleDependenciesCacheSerializer::collectStringsAndArrays(
1240
1242
auto clangDeps = dependencyInfo->getAsClangModule ();
1241
1243
assert (clangDeps);
1242
1244
addIdentifier (clangDeps->pcmOutputPath );
1245
+ addIdentifier (clangDeps->mappedPCMPath );
1243
1246
addIdentifier (clangDeps->moduleMapFile );
1244
1247
addIdentifier (clangDeps->contextHash );
1245
1248
addStringArray (moduleID, ModuleIdentifierArrayKind::NonPathCommandLine,
0 commit comments