Skip to content

Commit 20d8d0f

Browse files
author
Greg Parker
committed
Don't static_assert ObjC bits on non-ObjC platforms.
1 parent 810fc35 commit 20d8d0f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

stdlib/public/runtime/WeakReference.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,15 @@ class WeakReferenceBits {
100100
static_assert((NativeMarkerMask & heap_object_abi::SwiftSpareBitsMask)
101101
== NativeMarkerMask,
102102
"native marker mask must fall within Swift spare bits");
103+
#if SWIFT_OBJC_INTEROP
103104
static_assert((NativeMarkerMask & heap_object_abi::ObjCReservedBitsMask)
104105
== heap_object_abi::ObjCReservedBitsMask,
105106
"native marker mask must contain all ObjC tagged pointer bits");
106107
static_assert((NativeMarkerValue & heap_object_abi::ObjCReservedBitsMask)
107108
== 0,
108109
"native marker value must not interfere with ObjC bits");
109-
110+
#endif
111+
110112
uintptr_t bits;
111113

112114
public:

0 commit comments

Comments
 (0)