@@ -2261,11 +2261,12 @@ class SwiftAPIDigesterInvocation {
2261
2261
std::string BaselineSDK;
2262
2262
std::string Triple;
2263
2263
std::string SwiftVersion;
2264
- std::vector<std::string> CCSystemFrameworkPaths ;
2264
+ std::vector<std::string> SystemFrameworkPaths ;
2265
2265
std::vector<std::string> BaselineFrameworkPaths;
2266
2266
std::vector<std::string> FrameworkPaths;
2267
- std::vector<std::string> BaselineModuleInputPaths;
2268
- std::vector<std::string> ModuleInputPaths;
2267
+ std::vector<std::string> SystemModuleImportPaths;
2268
+ std::vector<std::string> BaselineModuleImportPaths;
2269
+ std::vector<std::string> ModuleImportPaths;
2269
2270
std::string ModuleList;
2270
2271
std::vector<std::string> ModuleNames;
2271
2272
std::vector<std::string> PreferInterfaceForModules;
@@ -2362,11 +2363,12 @@ class SwiftAPIDigesterInvocation {
2362
2363
BaselineSDK = ParsedArgs.getLastArgValue (OPT_bsdk).str ();
2363
2364
Triple = ParsedArgs.getLastArgValue (OPT_target).str ();
2364
2365
SwiftVersion = ParsedArgs.getLastArgValue (OPT_swift_version).str ();
2365
- CCSystemFrameworkPaths = ParsedArgs.getAllArgValues (OPT_iframework );
2366
+ SystemFrameworkPaths = ParsedArgs.getAllArgValues (OPT_Fsystem );
2366
2367
BaselineFrameworkPaths = ParsedArgs.getAllArgValues (OPT_BF);
2367
2368
FrameworkPaths = ParsedArgs.getAllArgValues (OPT_F);
2368
- BaselineModuleInputPaths = ParsedArgs.getAllArgValues (OPT_BI);
2369
- ModuleInputPaths = ParsedArgs.getAllArgValues (OPT_I);
2369
+ SystemModuleImportPaths = ParsedArgs.getAllArgValues (OPT_Isystem);
2370
+ BaselineModuleImportPaths = ParsedArgs.getAllArgValues (OPT_BI);
2371
+ ModuleImportPaths = ParsedArgs.getAllArgValues (OPT_I);
2370
2372
ModuleList = ParsedArgs.getLastArgValue (OPT_module_list_file).str ();
2371
2373
ModuleNames = ParsedArgs.getAllArgValues (OPT_module);
2372
2374
PreferInterfaceForModules =
@@ -2421,7 +2423,7 @@ class SwiftAPIDigesterInvocation {
2421
2423
}
2422
2424
2423
2425
bool hasBaselineInput () {
2424
- return !BaselineModuleInputPaths .empty () ||
2426
+ return !BaselineModuleImportPaths .empty () ||
2425
2427
!BaselineFrameworkPaths.empty () || !BaselineSDK.empty ();
2426
2428
}
2427
2429
@@ -2476,29 +2478,30 @@ class SwiftAPIDigesterInvocation {
2476
2478
InitInvoke.setRuntimeResourcePath (ResourceDir);
2477
2479
}
2478
2480
std::vector<SearchPathOptions::SearchPath> FramePaths;
2479
- for (const auto &path : CCSystemFrameworkPaths ) {
2481
+ for (const auto &path : SystemFrameworkPaths ) {
2480
2482
FramePaths.push_back ({path, /* isSystem=*/ true });
2481
2483
}
2484
+ std::vector<SearchPathOptions::SearchPath> ImportPaths;
2485
+ for (const auto &path : SystemModuleImportPaths) {
2486
+ ImportPaths.push_back ({path, /* isSystem=*/ true });
2487
+ }
2482
2488
if (IsBaseline) {
2483
2489
for (const auto &path : BaselineFrameworkPaths) {
2484
2490
FramePaths.push_back ({path, /* isSystem=*/ false });
2485
2491
}
2486
- std::vector<SearchPathOptions::SearchPath> ImportPaths;
2487
- for (const auto &path : BaselineModuleInputPaths) {
2492
+ for (const auto &path : BaselineModuleImportPaths) {
2488
2493
ImportPaths.push_back ({path, /* isSystem=*/ false });
2489
2494
}
2490
- InitInvoke.setImportSearchPaths (ImportPaths);
2491
2495
} else {
2492
2496
for (const auto &path : FrameworkPaths) {
2493
2497
FramePaths.push_back ({path, /* isSystem=*/ false });
2494
2498
}
2495
- std::vector<SearchPathOptions::SearchPath> ImportPaths;
2496
- for (const auto &path : ModuleInputPaths) {
2499
+ for (const auto &path : ModuleImportPaths) {
2497
2500
ImportPaths.push_back ({path, /* isSystem=*/ false });
2498
2501
}
2499
- InitInvoke.setImportSearchPaths (ImportPaths);
2500
2502
}
2501
2503
InitInvoke.setFrameworkSearchPaths (FramePaths);
2504
+ InitInvoke.setImportSearchPaths (ImportPaths);
2502
2505
if (!ModuleList.empty ()) {
2503
2506
if (readFileLineByLine (ModuleList, Modules))
2504
2507
exit (1 );
0 commit comments