@@ -56,6 +56,7 @@ bool FrontendOptions::needsProperModuleName(ActionType action) {
56
56
case ActionType::Immediate:
57
57
case ActionType::REPL:
58
58
case ActionType::PrintVersion:
59
+ case ActionType::PrintFeature:
59
60
return false ;
60
61
case ActionType::EmitAssembly:
61
62
case ActionType::EmitIR:
@@ -81,6 +82,7 @@ bool FrontendOptions::shouldActionOnlyParse(ActionType action) {
81
82
case ActionType::ScanDependencies:
82
83
case ActionType::ScanClangDependencies:
83
84
case ActionType::PrintVersion:
85
+ case ActionType::PrintFeature:
84
86
return true ;
85
87
default :
86
88
return false ;
@@ -103,6 +105,7 @@ bool FrontendOptions::doesActionRequireSwiftStandardLibrary(ActionType action) {
103
105
case ActionType::DumpPCM:
104
106
case ActionType::CompileModuleFromInterface:
105
107
case ActionType::TypecheckModuleFromInterface:
108
+ case ActionType::PrintFeature:
106
109
return false ;
107
110
case ActionType::ResolveImports:
108
111
case ActionType::Typecheck:
@@ -134,6 +137,7 @@ bool FrontendOptions::doesActionRequireInputs(ActionType action) {
134
137
switch (action) {
135
138
case ActionType::NoneAction:
136
139
case ActionType::PrintVersion:
140
+ case ActionType::PrintFeature:
137
141
return false ;
138
142
case ActionType::REPL:
139
143
case ActionType::Parse:
@@ -175,6 +179,7 @@ bool FrontendOptions::doesActionPerformEndOfPipelineActions(ActionType action) {
175
179
switch (action) {
176
180
case ActionType::NoneAction:
177
181
case ActionType::PrintVersion:
182
+ case ActionType::PrintFeature:
178
183
case ActionType::EmitPCH:
179
184
case ActionType::EmitPCM:
180
185
case ActionType::DumpPCM:
@@ -305,6 +310,8 @@ FrontendOptions::formatForPrincipalOutputFileForAction(ActionType action) {
305
310
case ActionType::ScanDependencies:
306
311
case ActionType::ScanClangDependencies:
307
312
return TY_JSONDependencies;
313
+ case ActionType::PrintFeature:
314
+ return TY_JSONFeatures;
308
315
}
309
316
llvm_unreachable (" unhandled action" );
310
317
}
@@ -327,6 +334,7 @@ bool FrontendOptions::canActionEmitDependencies(ActionType action) {
327
334
case ActionType::REPL:
328
335
case ActionType::DumpPCM:
329
336
case ActionType::PrintVersion:
337
+ case ActionType::PrintFeature:
330
338
return false ;
331
339
case ActionType::ResolveImports:
332
340
case ActionType::Typecheck:
@@ -372,6 +380,7 @@ bool FrontendOptions::canActionEmitReferenceDependencies(ActionType action) {
372
380
case ActionType::ScanDependencies:
373
381
case ActionType::ScanClangDependencies:
374
382
case ActionType::PrintVersion:
383
+ case ActionType::PrintFeature:
375
384
return false ;
376
385
case ActionType::Typecheck:
377
386
case ActionType::MergeModules:
@@ -428,6 +437,7 @@ bool FrontendOptions::canActionEmitModuleSummary(ActionType action) {
428
437
case ActionType::MergeModules:
429
438
case ActionType::EmitModuleOnly:
430
439
case ActionType::PrintVersion:
440
+ case ActionType::PrintFeature:
431
441
return false ;
432
442
case ActionType::EmitSIL:
433
443
case ActionType::EmitSIB:
@@ -463,6 +473,7 @@ bool FrontendOptions::canActionEmitObjCHeader(ActionType action) {
463
473
case ActionType::ScanDependencies:
464
474
case ActionType::ScanClangDependencies:
465
475
case ActionType::PrintVersion:
476
+ case ActionType::PrintFeature:
466
477
return false ;
467
478
case ActionType::Typecheck:
468
479
case ActionType::MergeModules:
@@ -502,6 +513,7 @@ bool FrontendOptions::canActionEmitLoadedModuleTrace(ActionType action) {
502
513
case ActionType::ScanDependencies:
503
514
case ActionType::ScanClangDependencies:
504
515
case ActionType::PrintVersion:
516
+ case ActionType::PrintFeature:
505
517
return false ;
506
518
case ActionType::ResolveImports:
507
519
case ActionType::Typecheck:
@@ -547,6 +559,7 @@ bool FrontendOptions::canActionEmitModule(ActionType action) {
547
559
case ActionType::ScanDependencies:
548
560
case ActionType::ScanClangDependencies:
549
561
case ActionType::PrintVersion:
562
+ case ActionType::PrintFeature:
550
563
return false ;
551
564
case ActionType::MergeModules:
552
565
case ActionType::EmitModuleOnly:
@@ -592,6 +605,7 @@ bool FrontendOptions::canActionEmitInterface(ActionType action) {
592
605
case ActionType::DumpPCM:
593
606
case ActionType::ScanDependencies:
594
607
case ActionType::ScanClangDependencies:
608
+ case ActionType::PrintFeature:
595
609
return false ;
596
610
case ActionType::Typecheck:
597
611
case ActionType::MergeModules:
@@ -639,6 +653,7 @@ bool FrontendOptions::doesActionProduceOutput(ActionType action) {
639
653
case ActionType::DumpPCM:
640
654
case ActionType::ScanDependencies:
641
655
case ActionType::ScanClangDependencies:
656
+ case ActionType::PrintFeature:
642
657
return true ;
643
658
644
659
case ActionType::NoneAction:
@@ -687,6 +702,7 @@ bool FrontendOptions::doesActionProduceTextualOutput(ActionType action) {
687
702
case ActionType::ScanDependencies:
688
703
case ActionType::ScanClangDependencies:
689
704
case ActionType::PrintVersion:
705
+ case ActionType::PrintFeature:
690
706
return true ;
691
707
}
692
708
llvm_unreachable (" unhandled action" );
@@ -714,6 +730,7 @@ bool FrontendOptions::doesActionGenerateSIL(ActionType action) {
714
730
case ActionType::ScanDependencies:
715
731
case ActionType::ScanClangDependencies:
716
732
case ActionType::PrintVersion:
733
+ case ActionType::PrintFeature:
717
734
return false ;
718
735
case ActionType::EmitSILGen:
719
736
case ActionType::EmitSIBGen:
@@ -762,6 +779,7 @@ bool FrontendOptions::doesActionGenerateIR(ActionType action) {
762
779
case ActionType::ScanDependencies:
763
780
case ActionType::ScanClangDependencies:
764
781
case ActionType::PrintVersion:
782
+ case ActionType::PrintFeature:
765
783
return false ;
766
784
case ActionType::Immediate:
767
785
case ActionType::REPL:
0 commit comments