Skip to content

[Reflection] Update some missing availability #63087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import Swift

@available(SwiftStdlib 9999, *)
@available(SwiftStdlib 5.9, *)
@frozen
public struct ConformanceDescriptor: PublicLayout {
public typealias Layout = (
Expand All @@ -29,7 +29,7 @@ public struct ConformanceDescriptor: PublicLayout {
}
}

@available(SwiftStdlib 9999, *)
@available(SwiftStdlib 5.9, *)
extension ConformanceDescriptor {
@inlinable
public var `protocol`: ProtocolDescriptor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import Swift

@available(SwiftStdlib 9999, *)
@available(SwiftStdlib 5.9, *)
@frozen
public struct AnyExistentialContainer {
public typealias Storage = (
Expand All @@ -38,7 +38,7 @@ public struct AnyExistentialContainer {
}
}

@available(SwiftStdlib 9999, *)
@available(SwiftStdlib 5.9, *)
extension AnyExistentialContainer {
@inlinable
public mutating func allocateBox(_ body: (UnsafeMutableRawPointer) -> ()) {
Expand Down Expand Up @@ -80,7 +80,7 @@ extension AnyExistentialContainer {
}
}

@available(SwiftStdlib 9999, *)
@available(SwiftStdlib 5.9, *)
@frozen
public struct ExistentialContainer {
public typealias Storage = (
Expand All @@ -92,7 +92,7 @@ public struct ExistentialContainer {
var storage: Storage
}

@available(SwiftStdlib 9999, *)
@available(SwiftStdlib 5.9, *)
@inlinable
public func container(for box: Any) -> AnyExistentialContainer {
unsafeBitCast(box)
Expand Down
8 changes: 4 additions & 4 deletions stdlib/public/Reflection/Sources/_Runtime/Functions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import Swift
import _SwiftRuntimeShims

@available(SwiftStdlib 9999, *)
@available(SwiftStdlib 5.9, *)
@frozen
public struct BoxPair {
public typealias Storage = (
Expand All @@ -34,11 +34,11 @@ public struct BoxPair {
}
}

@available(SwiftStdlib 9999, *)
@available(SwiftStdlib 5.9, *)
@_silgen_name("swift_allocBox")
public func swift_allocBox(_: Metadata) -> BoxPair

@available(SwiftStdlib 9999, *)
@available(SwiftStdlib 5.9, *)
@inlinable
public func swift_conformsToProtocol(
_ type: Metadata,
Expand All @@ -51,7 +51,7 @@ public func swift_conformsToProtocol(
return WitnessTable(wt)
}

@available(SwiftStdlib 9999, *)
@available(SwiftStdlib 5.9, *)
@inlinable
public func swift_projectBox(
_ obj: HeapObject
Expand Down
4 changes: 2 additions & 2 deletions stdlib/public/Reflection/Sources/_Runtime/HeapObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import Swift

@available(SwiftStdlib 9999, *)
@available(SwiftStdlib 5.9, *)
@frozen
public struct HeapObject: PublicLayout {
public typealias Layout = (
Expand All @@ -27,7 +27,7 @@ public struct HeapObject: PublicLayout {
}
}

@available(SwiftStdlib 9999, *)
@available(SwiftStdlib 5.9, *)
extension HeapObject {
@inlinable
public var type: Metadata {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import Swift

@available(SwiftStdlib 9999, *)
@available(SwiftStdlib 5.9, *)
@frozen
public struct WitnessTable: PublicLayout {
public typealias Layout = ConformanceDescriptor
Expand Down