Commit 8dd36fe
committed
[cxx-interop] Modularize __msvc_bit_utils on Windows
`__msvc_bit_utils.hpp` was added in a recent version of MSVC, and it is causing build errors for SwiftCompilerSources:
```
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\numeric:598:12: error: function '_Select_countr_zero_impl<unsigned long long, (lambda at C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\numeric:598:55)>' with deduced return type cannot be used before it is defined
return _Select_countr_zero_impl<_Common_unsigned>([=](auto _Countr_zero_impl) {
```
This change references the `__msvc_bit_utils.hpp` header from the modulemap. Since we still need to support older versions of Visual Studio that do not provide `__msvc_bit_utils.hpp`, this also teaches ClangImporter to inject an empty header file named `__msvc_bit_utils.hpp` into the system include directory, unless it already exists.
rdar://137066642
(cherry picked from commit 16e7cbe)1 parent ad236a8 commit 8dd36fe
File tree
5 files changed
+45
-13
lines changed- lib/ClangImporter
- stdlib/public/Platform
- test/Interop/Cxx/stdlib
- Inputs
5 files changed
+45
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
418 | | - | |
| 417 | + | |
| 418 | + | |
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
424 | 423 | | |
425 | 424 | | |
426 | 425 | | |
427 | | - | |
| 426 | + | |
428 | 427 | | |
429 | 428 | | |
430 | 429 | | |
| |||
450 | 449 | | |
451 | 450 | | |
452 | 451 | | |
453 | | - | |
| 452 | + | |
| 453 | + | |
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | | - | |
| 480 | + | |
| 481 | + | |
481 | 482 | | |
482 | 483 | | |
483 | 484 | | |
| |||
503 | 504 | | |
504 | 505 | | |
505 | 506 | | |
506 | | - | |
| 507 | + | |
| 508 | + | |
507 | 509 | | |
508 | 510 | | |
509 | 511 | | |
510 | 512 | | |
511 | 513 | | |
512 | 514 | | |
513 | | - | |
514 | | - | |
| 515 | + | |
| 516 | + | |
515 | 517 | | |
516 | | - | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
517 | 528 | | |
518 | 529 | | |
519 | 530 | | |
| |||
573 | 584 | | |
574 | 585 | | |
575 | 586 | | |
576 | | - | |
577 | | - | |
578 | | - | |
| 587 | + | |
| 588 | + | |
579 | 589 | | |
580 | 590 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
702 | 702 | | |
703 | 703 | | |
704 | 704 | | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
705 | 710 | | |
706 | 711 | | |
707 | 712 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
1 | 7 | | |
2 | 8 | | |
3 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments