@@ -241,12 +241,14 @@ struct ExplicitSwiftModuleInputInfo {
241
241
ExplicitSwiftModuleInputInfo (std::string modulePath,
242
242
llvm::Optional<std::string> moduleDocPath,
243
243
llvm::Optional<std::string> moduleSourceInfoPath,
244
+ llvm::Optional<std::vector<std::string>> headerDependencyPaths,
244
245
bool isFramework = false ,
245
246
bool isSystem = false ,
246
247
llvm::Optional<std::string> moduleCacheKey = None)
247
248
: modulePath(modulePath),
248
249
moduleDocPath (moduleDocPath),
249
250
moduleSourceInfoPath(moduleSourceInfoPath),
251
+ headerDependencyPaths(headerDependencyPaths),
250
252
isFramework(isFramework),
251
253
isSystem(isSystem),
252
254
moduleCacheKey(moduleCacheKey) {}
@@ -256,6 +258,8 @@ struct ExplicitSwiftModuleInputInfo {
256
258
llvm::Optional<std::string> moduleDocPath;
257
259
// Path of the .swiftsourceinfo file.
258
260
llvm::Optional<std::string> moduleSourceInfoPath;
261
+ // Paths of the precompiled header dependencies of this module.
262
+ llvm::Optional<std::vector<std::string>> headerDependencyPaths;
259
263
// A flag that indicates whether this module is a framework
260
264
bool isFramework = false ;
261
265
// A flag that indicates whether this module is a system module
@@ -369,34 +373,39 @@ class ExplicitModuleMapParser {
369
373
llvm::Optional<std::string> swiftModulePath, swiftModuleDocPath,
370
374
swiftModuleSourceInfoPath, swiftModuleCacheKey,
371
375
clangModuleCacheKey;
376
+ llvm::Optional<std::vector<std::string>> headerDependencyPaths;
372
377
std::string clangModuleMapPath = " " , clangModulePath = " " ;
373
378
bool isFramework = false , isSystem = false ;
374
379
for (auto &entry : *mapNode) {
375
380
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" ) {
399
382
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
+ }
400
409
}
401
410
}
402
411
if (moduleName.empty ())
@@ -409,6 +418,7 @@ class ExplicitModuleMapParser {
409
418
ExplicitSwiftModuleInputInfo entry (swiftModulePath.value (),
410
419
swiftModuleDocPath,
411
420
swiftModuleSourceInfoPath,
421
+ headerDependencyPaths,
412
422
isFramework,
413
423
isSystem,
414
424
swiftModuleCacheKey);
0 commit comments