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 {
97
97
// out the proper includes from libobjc. The values MUST match the ones from
98
98
// libobjc. Debug builds check these values against objc_debug_isa_class_mask
99
99
// 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
102
102
// swift_isaMask and the corresponding code in case that changes. libobjc's
103
103
// mask has the bottom bits clear to include pointer alignment, match that
104
104
// value here.
105
105
# define SWIFT_ISA_MASK 0xfffffffffffffff8ULL
106
106
# 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
108
116
# elif __x86_64__
109
117
# define SWIFT_ISA_MASK 0x00007ffffffffff8ULL
110
118
# else
You can’t perform that action at this time.
0 commit comments