File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -97,14 +97,22 @@ class TypeInfo {
9797// out the proper includes from libobjc. The values MUST match the ones from
9898// libobjc. Debug builds check these values against objc_debug_isa_class_mask
9999// from libobjc.
100- # if TARGET_OS_SIMULATOR
101- // Simulators don't currently use isa masking, but we still want to emit
100+ # if TARGET_OS_SIMULATOR && __x86_64__
101+ // Simulators don't currently use isa masking on x86 , but we still want to emit
102102// swift_isaMask and the corresponding code in case that changes. libobjc's
103103// mask has the bottom bits clear to include pointer alignment, match that
104104// value here.
105105# define SWIFT_ISA_MASK 0xfffffffffffffff8ULL
106106# elif __arm64__
107- # define SWIFT_ISA_MASK 0x0000000ffffffff8ULL
107+ # if __has_feature(ptrauth_calls)
108+ # define SWIFT_ISA_MASK 0x007ffffffffffff8ULL
109+ # else
110+ # if TARGET_OS_OSX
111+ # define SWIFT_ISA_MASK 0x00007ffffffffff8ULL
112+ # else
113+ # define SWIFT_ISA_MASK 0x0000000ffffffff8ULL
114+ # endif
115+ # endif
108116# elif __x86_64__
109117# define SWIFT_ISA_MASK 0x00007ffffffffff8ULL
110118# else
You can’t perform that action at this time.
0 commit comments