Skip to content

Commit 21c9d3a

Browse files
committed
[ASTGen] Use arch(_:) instead of _pointerBitWidth(_:)
We still need to support older Swift compilers which does't have '_pointerBitWidth(_:)' pletform condition.
1 parent 71ca3e1 commit 21c9d3a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/ASTGen/Sources/ASTGen/StableHasher.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,10 @@ struct StableHasher {
131131

132132
@inline(__always)
133133
mutating func combine(_ value: UInt) {
134-
#if _pointerBitWidth(_64)
135-
combine(UInt64(truncatingIfNeeded: value))
136-
#elseif _pointerBitWidth(_32)
134+
#if arch(i386) || arch(arm) || arch(arm64_32) || arch(wasm32) // FIXME: Adopt _pointerBitWidth(_:).
137135
combine(UInt32(truncatingIfNeeded: value))
138136
#else
139-
#error("Unknown platform")
137+
combine(UInt64(truncatingIfNeeded: value))
140138
#endif
141139
}
142140

0 commit comments

Comments
 (0)