@@ -26,11 +26,6 @@ struct SectionBounds: Sendable {
2626 enum Kind : Equatable , Hashable , CaseIterable {
2727 /// The test content metadata section.
2828 case testContent
29-
30- #if !SWT_NO_LEGACY_TEST_DISCOVERY
31- /// The type metadata section.
32- case typeMetadata
33- #endif
3429 }
3530
3631 /// All section bounds of the given kind found in the current process.
@@ -61,10 +56,6 @@ extension SectionBounds.Kind {
6156 switch self {
6257 case . testContent:
6358 ( " __DATA_CONST " , " __swift5_tests " )
64- #if !SWT_NO_LEGACY_TEST_DISCOVERY
65- case . typeMetadata:
66- ( " __TEXT " , " __swift5_types " )
67- #endif
6859 }
6960 }
7061}
@@ -189,10 +180,6 @@ private func _sectionBounds(_ kind: SectionBounds.Kind) -> [SectionBounds] {
189180 let range = switch context. pointee. kind {
190181 case . testContent:
191182 sections. swift5_tests
192- #if !SWT_NO_LEGACY_TEST_DISCOVERY
193- case . typeMetadata:
194- sections. swift5_type_metadata
195- #endif
196183 }
197184 let start = UnsafeRawPointer ( bitPattern: range. start)
198185 let size = Int ( clamping: range. length)
@@ -284,10 +271,6 @@ private func _sectionBounds(_ kind: SectionBounds.Kind) -> some Sequence<Section
284271 let sectionName = switch kind {
285272 case . testContent:
286273 " .sw5test "
287- #if !SWT_NO_LEGACY_TEST_DISCOVERY
288- case . typeMetadata:
289- " .sw5tymd "
290- #endif
291274 }
292275 return HMODULE . all. lazy. compactMap { _findSection ( named: sectionName, in: $0) }
293276}
@@ -335,25 +318,13 @@ private struct _SectionBound: Sendable, ~Copyable {
335318#if SWT_TARGET_OS_APPLE
336319@_silgen_name ( raw: " section$start$__DATA_CONST$__swift5_tests " ) private nonisolated ( unsafe) var _testContentSectionBegin : _SectionBound
337320@_silgen_name ( raw: " section$end$__DATA_CONST$__swift5_tests " ) private nonisolated ( unsafe) var _testContentSectionEnd: _SectionBound
338- #if !SWT_NO_LEGACY_TEST_DISCOVERY
339- @_silgen_name ( raw: " section$start$__TEXT$__swift5_types " ) private nonisolated ( unsafe) var _typeMetadataSectionBegin : _SectionBound
340- @_silgen_name ( raw: " section$end$__TEXT$__swift5_types " ) private nonisolated ( unsafe) var _typeMetadataSectionEnd: _SectionBound
341- #endif
342321#elseif os(Linux) || os(FreeBSD) || os(OpenBSD) || os(Android) || os(WASI)
343322@_silgen_name ( raw: " __start_swift5_tests " ) private nonisolated ( unsafe) var _testContentSectionBegin : _SectionBound
344323@_silgen_name ( raw: " __stop_swift5_tests " ) private nonisolated ( unsafe) var _testContentSectionEnd: _SectionBound
345- #if !SWT_NO_LEGACY_TEST_DISCOVERY
346- @_silgen_name ( raw: " __start_swift5_type_metadata " ) private nonisolated ( unsafe) var _typeMetadataSectionBegin : _SectionBound
347- @_silgen_name ( raw: " __stop_swift5_type_metadata " ) private nonisolated ( unsafe) var _typeMetadataSectionEnd: _SectionBound
348- #endif
349324#else
350325#warning("Platform-specific implementation missing: Runtime test discovery unavailable (static)")
351326private nonisolated ( unsafe) let _testContentSectionBegin = UnsafeMutableRawPointer . allocate ( byteCount: 1 , alignment: 16 )
352327private nonisolated ( unsafe) let _testContentSectionEnd = _testContentSectionBegin
353- #if !SWT_NO_LEGACY_TEST_DISCOVERY
354- private nonisolated ( unsafe) let _typeMetadataSectionBegin = UnsafeMutableRawPointer . allocate ( byteCount: 1 , alignment: 16 )
355- private nonisolated ( unsafe) let _typeMetadataSectionEnd = _typeMetadataSectionBegin
356- #endif
357328#endif
358329
359330/// The common implementation of ``SectionBounds/all(_:)`` for platforms that do
0 commit comments