Skip to content

Commit 1ed7874

Browse files
committed
Runtime: silence some warnings
Silence warnings about deleted defaulted constructors due to the non-trivial constructor for the atomic type. Guard a conditionally used function with the appropriate guard.
1 parent 43f04ee commit 1ed7874

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

stdlib/public/runtime/SwiftObject.mm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,13 +583,14 @@ static bool isNonNative_unTagged_bridgeObject(void *object) {
583583
return (uintptr_t(object) & objectPointerIsObjCBit) != 0
584584
&& (uintptr_t(object) & heap_object_abi::BridgeObjectTagBitsMask) == 0;
585585
}
586-
#endif
587586

588587
/// Return true iff the given BridgeObject is a tagged value.
589588
static bool isBridgeObjectTaggedPointer(void *object) {
590-
return (uintptr_t(object) & heap_object_abi::BridgeObjectTagBitsMask) != 0;
589+
return (uintptr_t(object) & heap_object_abi::BridgeObjectTagBitsMask) != 0;
591590
}
592591

592+
#endif
593+
593594
// Mask out the spare bits in a bridgeObject, returning the object it
594595
// encodes.
595596
///

stdlib/public/runtime/WeakReference.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ class WeakReference {
189189

190190
public:
191191

192-
WeakReference() = default;
192+
WeakReference() : nativeValue() {}
193193

194194
WeakReference(std::nullptr_t)
195195
: nativeValue(WeakReferenceBits(nullptr)) { }

0 commit comments

Comments
 (0)