Skip to content

Commit 217358b

Browse files
authored
Merge pull request #67281 from kubamracek/guard-opaque-isas
Be consistent about guarding SWIFT_HAS_OPAQUE_ISAS with SWIFT_OBJC_INTEROP
2 parents e34c20f + aab7eab commit 217358b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/runtime/Private.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#endif
3131

3232
// Opaque ISAs need to use object_getClass which is in runtime.h
33-
#if SWIFT_HAS_OPAQUE_ISAS
33+
#if SWIFT_OBJC_INTEROP && SWIFT_HAS_OPAQUE_ISAS
3434
#include <objc/runtime.h>
3535
#endif
3636

@@ -172,7 +172,7 @@ class TypeInfo {
172172
/// Note, in this case, the object may or may not have a non-pointer ISA.
173173
/// Masking, or otherwise, may be required to get a class pointer.
174174
static inline const ClassMetadata *_swift_getClassOfAllocated(const void *object) {
175-
#if SWIFT_HAS_OPAQUE_ISAS
175+
#if SWIFT_OBJC_INTEROP && SWIFT_HAS_OPAQUE_ISAS
176176
// The ISA is opaque so masking it will not return a pointer. We instead
177177
// need to call the objc runtime to get the class.
178178
id idObject = reinterpret_cast<id>(const_cast<void *>(object));

0 commit comments

Comments
 (0)