@@ -117,6 +117,9 @@ public enum FileType: String, Hashable, CaseIterable, Codable {
117117 /// JSON-based -emit-supported-features output
118118 case jsonCompilerFeatures = " compilerFeatures.json "
119119
120+ /// JSON-based -print-supported-features output
121+ case jsonSupportedFeatures = " supportedFeatures.json "
122+
120123 /// JSON-based binary Swift module artifact description
121124 case jsonSwiftArtifacts = " artifacts.json "
122125
@@ -271,6 +274,9 @@ extension FileType: CustomStringConvertible {
271274
272275 case . cachedDiagnostics:
273276 return " cached-diagnostics "
277+
278+ case . jsonSupportedFeatures:
279+ return " json-supported-swift-features "
274280 }
275281 }
276282}
@@ -291,7 +297,8 @@ extension FileType {
291297 . jsonDependencies, . clangModuleMap, . jsonTargetInfo, . jsonCompilerFeatures,
292298 . jsonSwiftArtifacts, . indexUnitOutputPath, . modDepCache, . jsonAPIBaseline,
293299 . jsonABIBaseline, . swiftConstValues, . jsonAPIDescriptor,
294- . moduleSummary, . moduleSemanticInfo, . cachedDiagnostics, . raw_llvmIr:
300+ . moduleSummary, . moduleSemanticInfo, . cachedDiagnostics, . raw_llvmIr,
301+ . jsonSupportedFeatures:
295302 return false
296303 }
297304 }
@@ -408,6 +415,8 @@ extension FileType {
408415 return " module-semantic-info "
409416 case . cachedDiagnostics:
410417 return " cached-diagnostics "
418+ case . jsonSupportedFeatures:
419+ return " json-supported-swift-features "
411420 }
412421 }
413422}
@@ -421,7 +430,7 @@ extension FileType {
421430 . jsonDependencies, . clangModuleMap, . jsonCompilerFeatures, . jsonTargetInfo,
422431 . jsonSwiftArtifacts, . jsonAPIBaseline, . jsonABIBaseline, . swiftConstValues,
423432 . jsonAPIDescriptor, . moduleSummary, . moduleSemanticInfo, . cachedDiagnostics,
424- . raw_llvmIr:
433+ . raw_llvmIr, . jsonSupportedFeatures :
425434 return true
426435 case . image, . object, . dSYM, . pch, . sib, . raw_sib, . swiftModule,
427436 . swiftDocumentation, . swiftSourceInfoFile, . llvmBitcode, . diagnostics,
@@ -446,15 +455,15 @@ extension FileType {
446455 . clangModuleMap, . jsonCompilerFeatures, . jsonTargetInfo, . jsonSwiftArtifacts,
447456 . indexUnitOutputPath, . jsonAPIBaseline, . jsonABIBaseline, . swiftConstValues,
448457 . jsonAPIDescriptor, . moduleSummary, . moduleSemanticInfo, . cachedDiagnostics,
449- . raw_llvmIr:
458+ . raw_llvmIr, . jsonSupportedFeatures :
450459 return false
451460 }
452461 }
453462
454463 /// Returns true if producing the file type requires running SILGen.
455464 var requiresSILGen : Bool {
456465 switch self {
457- case . swift, . ast, . indexData, . indexUnitOutputPath, . jsonCompilerFeatures, . jsonTargetInfo:
466+ case . swift, . ast, . indexData, . indexUnitOutputPath, . jsonCompilerFeatures, . jsonTargetInfo, . jsonSupportedFeatures :
458467 return false
459468 case . sil, . sib, . image, . object, . dSYM, . dependencies, . autolink, . swiftModule, . swiftDocumentation, . swiftInterface, . privateSwiftInterface, . packageSwiftInterface, . swiftSourceInfoFile, . swiftConstValues, . assembly, . raw_sil, . raw_sib, . llvmIR, . llvmBitcode, . diagnostics, . emitModuleDiagnostics, . emitModuleDependencies, . objcHeader, . swiftDeps, . modDepCache, . remap, . importedModules, . tbd, . jsonDependencies, . jsonSwiftArtifacts, . moduleTrace, . yamlOptimizationRecord, . bitstreamOptimizationRecord, . pcm, . pch, . clangModuleMap, . jsonAPIBaseline, . jsonABIBaseline, . jsonAPIDescriptor, . moduleSummary, . moduleSemanticInfo, . cachedDiagnostics, . raw_llvmIr:
460469 return true
@@ -469,7 +478,7 @@ extension FileType {
469478 . jsonSwiftArtifacts, . remap, . indexUnitOutputPath, . modDepCache,
470479 // the remaining should not be an output from a caching swift job.
471480 . swift, . image, . dSYM, . importedModules, . clangModuleMap,
472- . jsonCompilerFeatures, . jsonTargetInfo, . autolink:
481+ . jsonCompilerFeatures, . jsonTargetInfo, . autolink, . jsonSupportedFeatures :
473482 return false
474483 case . assembly, . llvmIR, . llvmBitcode, . object, . sil, . sib, . ast,
475484 . dependencies, . emitModuleDependencies, . swiftModule,
0 commit comments