Skip to content

Commit d0cbd89

Browse files
committed
[embedded] Workaround a build failure in non-assertion embedded stdlib builds, unblock CI
1 parent 841f015 commit d0cbd89

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stdlib/public/core/Int128.swift.gyb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,8 +715,12 @@ private func _wideDivide32<F: FixedWidthInteger & UnsignedInteger>(
715715
) -> (quotient: F, remainder: _Wide2<F>) {
716716
// The following invariants are guaranteed to hold by dividingFullWidth or
717717
// quotientAndRemainder before this function is invoked:
718+
#if !$Embedded
719+
// TODO: Investigate why this fails to compile in embedded Swift with
720+
// assertions off
718721
_internalInvariant(lhs.high != F.zero)
719722
_internalInvariant(rhs.high.leadingZeroBitCount == 0)
723+
#endif
720724
_internalInvariant((high: lhs.high, low: lhs.mid) < rhs)
721725

722726
// Estimate the quotient with a 2/1 division using just the top digits.

0 commit comments

Comments
 (0)