Skip to content

Commit 9e9a791

Browse files
committed
Revert "[Foundation] Fallback to presuming 32-bit platforms if we dont explicitly know that it is 64 bit; this allows for better portability (swiftlang#21290)"
This reverts commit 77c7a69.
1 parent 6d2bc79 commit 9e9a791

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

stdlib/public/Darwin/Foundation/Data.swift

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -683,15 +683,15 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl
683683
@usableFromInline
684684
typealias Buffer = (UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8,
685685
UInt8, UInt8, UInt8, UInt8, UInt8, UInt8) //len //enum
686-
#elseif arch(i386) || arch(arm) || arch(arm64_32)
686+
@usableFromInline
687+
var bytes: Buffer
688+
#elseif arch(i386) || arch(arm)
687689
@usableFromInline
688690
typealias Buffer = (UInt8, UInt8, UInt8, UInt8,
689691
UInt8, UInt8) //len //enum
690-
#else
691-
#error ("Unsupported architecture: a definition of Buffer needs to be made with N = (MemoryLayout<(Int, Int)>.size - 2) UInt8 members to a tuple")
692-
#endif
693692
@usableFromInline
694693
var bytes: Buffer
694+
#endif
695695
@usableFromInline
696696
var length: UInt8
697697

@@ -720,11 +720,9 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl
720720
assert(count <= MemoryLayout<Buffer>.size)
721721
#if arch(x86_64) || arch(arm64) || arch(s390x) || arch(powerpc64) || arch(powerpc64le)
722722
bytes = (UInt8(0), UInt8(0), UInt8(0), UInt8(0), UInt8(0), UInt8(0), UInt8(0), UInt8(0), UInt8(0), UInt8(0), UInt8(0), UInt8(0), UInt8(0), UInt8(0))
723-
#elseif arch(i386) || arch(arm) || arch(arm64_32)
723+
#elseif arch(i386) || arch(arm)
724724
bytes = (UInt8(0), UInt8(0), UInt8(0), UInt8(0),
725725
UInt8(0), UInt8(0))
726-
#else
727-
#error ("Unsupported architecture: initialization for Buffer is required for this architecture")
728726
#endif
729727
length = UInt8(count)
730728
}
@@ -880,11 +878,9 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl
880878
#if arch(x86_64) || arch(arm64) || arch(s390x) || arch(powerpc64) || arch(powerpc64le)
881879
@usableFromInline
882880
internal typealias HalfInt = Int32
883-
#elseif arch(i386) || arch(arm) || arch(arm64_32)
881+
#elseif arch(i386) || arch(arm)
884882
@usableFromInline
885883
internal typealias HalfInt = Int16
886-
#else
887-
#error ("Unsupported architecture: a definition of half of the pointer sized Int needs to be defined for this architecture")
888884
#endif
889885

890886
@usableFromInline

0 commit comments

Comments
 (0)