Commit 717e753
authored
[win][arm64ec] Handle empty function names (#151609)
While testing Arm64EC, I observed that LLVM crashes when an empty
function name is used. My original fix in #151409 was to raise an error,
but this change now handles the empty name via
`Mangler::getNameWithPrefix` (which assigns a name to the function).
To get this working, I had to create the `Mangler` in
`TargetLoweringObjectFile` early so it would be available to Arm64EC's
lowering. There's no reason why `Mangler` is only created when
`Initialize` is called (or re-created if it exists), and so I moved
creation to the constructor and switched the raw pointer for a
`unique_ptr` to avoid the explicit `delete` in the destructor.1 parent 05b52ef commit 717e753
File tree
3 files changed
+31
-5
lines changed- llvm
- lib
- IR
- Target/AArch64
- test/CodeGen/AArch64
3 files changed
+31
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
295 | 298 | | |
296 | 299 | | |
297 | 300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
597 | 597 | | |
598 | 598 | | |
599 | 599 | | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
600 | 608 | | |
601 | 609 | | |
602 | 610 | | |
| |||
608 | 616 | | |
609 | 617 | | |
610 | 618 | | |
611 | | - | |
| 619 | + | |
612 | 620 | | |
613 | 621 | | |
614 | 622 | | |
| |||
790 | 798 | | |
791 | 799 | | |
792 | 800 | | |
793 | | - | |
| 801 | + | |
794 | 802 | | |
795 | 803 | | |
796 | 804 | | |
| |||
807 | 815 | | |
808 | 816 | | |
809 | 817 | | |
810 | | - | |
| 818 | + | |
811 | 819 | | |
812 | 820 | | |
813 | 821 | | |
| |||
821 | 829 | | |
822 | 830 | | |
823 | 831 | | |
824 | | - | |
| 832 | + | |
825 | 833 | | |
826 | 834 | | |
827 | 835 | | |
| |||
927 | 935 | | |
928 | 936 | | |
929 | 937 | | |
930 | | - | |
| 938 | + | |
931 | 939 | | |
932 | 940 | | |
933 | 941 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments