Commit abea46e
authored
Make Float16 available for macOS on Apple Silicon (swiftlang#34821)
Due to an unstable (and undesirable) calling convention in the LLVM layer for x86, I had previously marked Float16 unconditionally unavailable on macOS. My hope was that Intel would stabilize the calling convention and we could make it available on both macOS platforms at the same time. Unfortunately, that hasn't happened, and we want to make the type available for macOS/arm users.
So, I am making the availability mirror Float80--the type will be unavailable for macOS on x86_64, and available on all other platforms (the other x86 platforms don't have a binary-stability guarantee to worry about). This isn't ideal. In particular, if/when the calling conventions for Float16 stabilize in LLVM, we would want to make the type available, but it would then have _different_ availability for different architectures of macOS, which the current availability system is not well-equipped to handle (it's possible, but not very ergonomic). Nonetheless, this seems like the best option.
The good news is that because the full API is already built in Swift (and simply marked unavailable), we can simply add macOS 11.0 availability for these API and it will work.1 parent 0360fe6 commit abea46e
File tree
9 files changed
+46
-47
lines changed- stdlib/public/core
- test
- ClangImporter
- stdlib
9 files changed
+46
-47
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | | - | |
61 | | - | |
62 | | - | |
| 61 | + | |
63 | 62 | | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4730 | 4730 | | |
4731 | 4731 | | |
4732 | 4732 | | |
4733 | | - | |
4734 | | - | |
4735 | | - | |
| 4733 | + | |
| 4734 | + | |
4736 | 4735 | | |
4737 | 4736 | | |
4738 | 4737 | | |
| |||
4763 | 4762 | | |
4764 | 4763 | | |
4765 | 4764 | | |
| 4765 | + | |
4766 | 4766 | | |
4767 | 4767 | | |
4768 | 4768 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | | - | |
48 | 49 | | |
49 | | - | |
50 | | - | |
51 | | - | |
| 50 | + | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
| |||
136 | 135 | | |
137 | 136 | | |
138 | 137 | | |
139 | | - | |
| 138 | + | |
140 | 139 | | |
141 | 140 | | |
142 | 141 | | |
| |||
166 | 165 | | |
167 | 166 | | |
168 | 167 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
| 168 | + | |
176 | 169 | | |
177 | 170 | | |
178 | 171 | | |
| |||
196 | 189 | | |
197 | 190 | | |
198 | 191 | | |
199 | | - | |
| 192 | + | |
200 | 193 | | |
201 | 194 | | |
202 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| |||
1106 | 1108 | | |
1107 | 1109 | | |
1108 | 1110 | | |
1109 | | - | |
| 1111 | + | |
1110 | 1112 | | |
| 1113 | + | |
| 1114 | + | |
1111 | 1115 | | |
1112 | 1116 | | |
1113 | 1117 | | |
| |||
1192 | 1196 | | |
1193 | 1197 | | |
1194 | 1198 | | |
1195 | | - | |
| 1199 | + | |
1196 | 1200 | | |
1197 | 1201 | | |
1198 | 1202 | | |
| |||
1343 | 1347 | | |
1344 | 1348 | | |
1345 | 1349 | | |
1346 | | - | |
| 1350 | + | |
1347 | 1351 | | |
1348 | 1352 | | |
1349 | 1353 | | |
1350 | 1354 | | |
1351 | | - | |
| 1355 | + | |
1352 | 1356 | | |
1353 | 1357 | | |
1354 | 1358 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1129 | 1129 | | |
1130 | 1130 | | |
1131 | 1131 | | |
| 1132 | + | |
| 1133 | + | |
1132 | 1134 | | |
1133 | 1135 | | |
1134 | 1136 | | |
| |||
1152 | 1154 | | |
1153 | 1155 | | |
1154 | 1156 | | |
1155 | | - | |
1156 | | - | |
1157 | | - | |
| 1157 | + | |
1158 | 1158 | | |
1159 | 1159 | | |
1160 | 1160 | | |
| |||
1184 | 1184 | | |
1185 | 1185 | | |
1186 | 1186 | | |
1187 | | - | |
1188 | | - | |
1189 | | - | |
| 1187 | + | |
1190 | 1188 | | |
1191 | 1189 | | |
1192 | 1190 | | |
| |||
1206 | 1204 | | |
1207 | 1205 | | |
1208 | 1206 | | |
1209 | | - | |
| 1207 | + | |
1210 | 1208 | | |
1211 | 1209 | | |
1212 | 1210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| 296 | + | |
296 | 297 | | |
297 | 298 | | |
298 | 299 | | |
| |||
303 | 304 | | |
304 | 305 | | |
305 | 306 | | |
306 | | - | |
307 | | - | |
308 | | - | |
| 307 | + | |
309 | 308 | | |
310 | 309 | | |
311 | 310 | | |
| |||
317 | 316 | | |
318 | 317 | | |
319 | 318 | | |
| 319 | + | |
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
261 | 260 | | |
262 | 261 | | |
263 | 262 | | |
| |||
299 | 298 | | |
300 | 299 | | |
301 | 300 | | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
302 | 304 | | |
303 | 305 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| 70 | + | |
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
353 | 351 | | |
354 | 352 | | |
355 | 353 | | |
| |||
425 | 423 | | |
426 | 424 | | |
427 | 425 | | |
428 | | - | |
| 426 | + | |
429 | 427 | | |
430 | 428 | | |
431 | 429 | | |
| |||
587 | 585 | | |
588 | 586 | | |
589 | 587 | | |
590 | | - | |
591 | | - | |
| 588 | + | |
| 589 | + | |
592 | 590 | | |
593 | 591 | | |
594 | 592 | | |
| |||
0 commit comments