@@ -241,12 +241,14 @@ struct ExplicitSwiftModuleInputInfo {
241241 ExplicitSwiftModuleInputInfo (std::string modulePath,
242242 llvm::Optional<std::string> moduleDocPath,
243243 llvm::Optional<std::string> moduleSourceInfoPath,
244+ llvm::Optional<std::vector<std::string>> headerDependencyPaths,
244245 bool isFramework = false ,
245246 bool isSystem = false ,
246247 llvm::Optional<std::string> moduleCacheKey = None)
247248 : modulePath(modulePath),
248249 moduleDocPath (moduleDocPath),
249250 moduleSourceInfoPath(moduleSourceInfoPath),
251+ headerDependencyPaths(headerDependencyPaths),
250252 isFramework(isFramework),
251253 isSystem(isSystem),
252254 moduleCacheKey(moduleCacheKey) {}
@@ -256,6 +258,8 @@ struct ExplicitSwiftModuleInputInfo {
256258 llvm::Optional<std::string> moduleDocPath;
257259 // Path of the .swiftsourceinfo file.
258260 llvm::Optional<std::string> moduleSourceInfoPath;
261+ // Paths of the precompiled header dependencies of this module.
262+ llvm::Optional<std::vector<std::string>> headerDependencyPaths;
259263 // A flag that indicates whether this module is a framework
260264 bool isFramework = false ;
261265 // A flag that indicates whether this module is a system module
@@ -369,34 +373,39 @@ class ExplicitModuleMapParser {
369373 llvm::Optional<std::string> swiftModulePath, swiftModuleDocPath,
370374 swiftModuleSourceInfoPath, swiftModuleCacheKey,
371375 clangModuleCacheKey;
376+ llvm::Optional<std::vector<std::string>> headerDependencyPaths;
372377 std::string clangModuleMapPath = " " , clangModulePath = " " ;
373378 bool isFramework = false , isSystem = false ;
374379 for (auto &entry : *mapNode) {
375380 auto key = getScalaNodeText (entry.getKey ());
376- auto val = getScalaNodeText (entry.getValue ());
377- if (key == " moduleName" ) {
378- moduleName = val;
379- } else if (key == " modulePath" ) {
380- swiftModulePath = val.str ();
381- } else if (key == " docPath" ) {
382- swiftModuleDocPath = val.str ();
383- } else if (key == " sourceInfoPath" ) {
384- swiftModuleSourceInfoPath = val.str ();
385- } else if (key == " isFramework" ) {
386- isFramework = parseBoolValue (val);
387- } else if (key == " isSystem" ) {
388- isSystem = parseBoolValue (val);
389- } else if (key == " clangModuleMapPath" ) {
390- clangModuleMapPath = val.str ();
391- } else if (key == " clangModulePath" ) {
392- clangModulePath = val.str ();
393- } else if (key == " moduleCacheKey" ) {
394- swiftModuleCacheKey = val.str ();
395- } else if (key == " clangModuleCacheKey" ) {
396- clangModuleCacheKey = val.str ();
397- } else {
398- // Being forgiving for future fields.
381+ if (key == " prebuiltHeaderDependencyPaths" ) {
399382 continue ;
383+ } else {
384+ auto val = getScalaNodeText (entry.getValue ());
385+ if (key == " moduleName" ) {
386+ moduleName = val;
387+ } else if (key == " modulePath" ) {
388+ swiftModulePath = val.str ();
389+ } else if (key == " docPath" ) {
390+ swiftModuleDocPath = val.str ();
391+ } else if (key == " sourceInfoPath" ) {
392+ swiftModuleSourceInfoPath = val.str ();
393+ } else if (key == " isFramework" ) {
394+ isFramework = parseBoolValue (val);
395+ } else if (key == " isSystem" ) {
396+ isSystem = parseBoolValue (val);
397+ } else if (key == " clangModuleMapPath" ) {
398+ clangModuleMapPath = val.str ();
399+ } else if (key == " clangModulePath" ) {
400+ clangModulePath = val.str ();
401+ } else if (key == " moduleCacheKey" ) {
402+ swiftModuleCacheKey = val.str ();
403+ } else if (key == " clangModuleCacheKey" ) {
404+ clangModuleCacheKey = val.str ();
405+ } else {
406+ // Being forgiving for future fields.
407+ continue ;
408+ }
400409 }
401410 }
402411 if (moduleName.empty ())
@@ -409,6 +418,7 @@ class ExplicitModuleMapParser {
409418 ExplicitSwiftModuleInputInfo entry (swiftModulePath.value (),
410419 swiftModuleDocPath,
411420 swiftModuleSourceInfoPath,
421+ headerDependencyPaths,
412422 isFramework,
413423 isSystem,
414424 swiftModuleCacheKey);
0 commit comments