@@ -39,11 +39,14 @@ public enum CanImportVersion {
3939
4040enum BuildConfigurationError : Error , CustomStringConvertible {
4141 case experimentalFeature( name: String )
42+ case notImplemented( name: String )
4243
4344 var description : String {
4445 switch self {
4546 case . experimentalFeature( let name) :
4647 return " ' \( name) ' is an experimental feature "
48+ case . notImplemented( let name) :
49+ return " ' \( name) ' not implemented "
4750 }
4851 }
4952}
@@ -228,18 +231,17 @@ public protocol BuildConfiguration {
228231 /// Determine whether the given name is the active target object file format (e.g., ELF).
229232 ///
230233 /// The target object file format can only be queried by an experimental
231- /// syntax `_objectFileFormat (<name>)`, e.g.,
234+ /// syntax `objectFormat (<name>)`, e.g.,
232235 ///
233236 /// ```swift
234- /// #if _objectFileFormat (ELF)
237+ /// #if objectFormat (ELF)
235238 /// // Special logic for ELF object file formats
236239 /// #endif
237240 /// ```
238241 /// - Parameters:
239242 /// - name: The name of the object file format.
240243 /// - Returns: Whether the target object file format matches the given name.
241- @_spi ( ExperimentalLanguageFeatures)
242- func isActiveTargetObjectFileFormat( name: String ) throws -> Bool
244+ func isActiveTargetObjectFormat( name: String ) throws -> Bool
243245
244246 /// The bit width of a data pointer for the target architecture.
245247 ///
@@ -307,9 +309,8 @@ public protocol BuildConfiguration {
307309/// Default implementation of BuildConfiguration, to avoid a revlock with the
308310/// swift repo, and breaking clients with the new addition to the protocol.
309311extension BuildConfiguration {
310- /// FIXME: This should be @_spi(ExperimentalLanguageFeatures) but cannot due
311- /// to rdar://147943518, https://github.com/swiftlang/swift/issues/80313
312- public func isActiveTargetObjectFileFormat( name: String ) throws -> Bool {
313- throw BuildConfigurationError . experimentalFeature ( name: " _objectFileFormat " )
312+ @available ( * , deprecated, message: " `BuildConfiguration` conformance must implement `isActiveTargetObjectFormat` " )
313+ public func isActiveTargetObjectFormat( name: String ) throws -> Bool {
314+ throw BuildConfigurationError . notImplemented ( name: " isActiveTargetObjectFormat " )
314315 }
315316}
0 commit comments