Commit eb63310
committed
[Clang] Only enable builtins on aux triple if supported by language
This patch makes it so that builtins for the aux triple only get enabled
if they are marked as supported by the current language options.
Otherwise we define them regardless of the language mode. This can cause
issues in certain scenarios, like if someone has a definition that
conflicts with a builtin gated behind __has_builtin, because
__has_builtin will return false given the builtin is only enabled on the
aux triple despite the builtin actually being enabled.
This is best exemplified with the __cpuidex conflict test.
Fixes #152558.1 parent 4629291 commit eb63310
File tree
3 files changed
+3
-7
lines changed- clang
- lib
- Basic
- Headers
- test/Headers
3 files changed
+3
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
| 229 | + | |
229 | 230 | | |
230 | 231 | | |
231 | 232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | 348 | | |
353 | 349 | | |
354 | 350 | | |
355 | 351 | | |
356 | 352 | | |
357 | | - | |
358 | 353 | | |
359 | 354 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments