Skip to content

Commit 99e518b

Browse files
committed
Guard Obj-C specifics in Metadata.cpp with SWIFT_OBJC_INTEROP
1 parent 84a21d1 commit 99e518b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

stdlib/public/runtime/Metadata.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
#endif
5050
#if SWIFT_PTRAUTH
5151
#include <ptrauth.h>
52+
#endif
53+
#if SWIFT_OBJC_INTEROP
5254
extern "C" void _objc_setClassCopyFixupHandler(void (* _Nonnull newFixupHandler)
5355
(Class _Nonnull oldClass, Class _Nonnull newClass));
5456
#endif
@@ -395,7 +397,7 @@ static GenericMetadataCache &unsafeGetInitializedCache(
395397
return lazyCache->unsafeGetAlreadyInitialized();
396398
}
397399

398-
#if SWIFT_PTRAUTH
400+
#if SWIFT_PTRAUTH && SWIFT_OBJC_INTEROP
399401
static void swift_objc_classCopyFixupHandler(Class oldClass, Class newClass) {
400402
auto oldClassMetadata = reinterpret_cast<const ClassMetadata *>(oldClass);
401403

0 commit comments

Comments
 (0)