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 @@ -96,14 +96,22 @@ class TypeInfo {
96
96
// out the proper includes from libobjc. The values MUST match the ones from
97
97
// libobjc. Debug builds check these values against objc_debug_isa_class_mask
98
98
// from libobjc.
99
- # if TARGET_OS_SIMULATOR
100
- // Simulators don't currently use isa masking, but we still want to emit
99
+ # if TARGET_OS_SIMULATOR && __x86_64__
100
+ // Simulators don't currently use isa masking on x86 , but we still want to emit
101
101
// swift_isaMask and the corresponding code in case that changes. libobjc's
102
102
// mask has the bottom bits clear to include pointer alignment, match that
103
103
// value here.
104
104
# define SWIFT_ISA_MASK 0xfffffffffffffff8ULL
105
105
# elif __arm64__
106
- # define SWIFT_ISA_MASK 0x0000000ffffffff8ULL
106
+ # if __has_feature(ptrauth_calls)
107
+ # define SWIFT_ISA_MASK 0x007ffffffffffff8ULL
108
+ # else
109
+ # if TARGET_OS_OSX
110
+ # define SWIFT_ISA_MASK 0x00007ffffffffff8ULL
111
+ # else
112
+ # define SWIFT_ISA_MASK 0x0000000ffffffff8ULL
113
+ # endif
114
+ # endif
107
115
# elif __x86_64__
108
116
# define SWIFT_ISA_MASK 0x00007ffffffffff8ULL
109
117
# else
You can’t perform that action at this time.
0 commit comments