Commit e96f9e5
committed
[SILGen] InitAccessors: Materialize default argument if it's required by init/setter
We do this in `GetterSetterComponent` but overlooked it for default initialization
expressions. If init/setter require `newValue` to be passed indirectly we have to
make sure to materialize it before handing to `assign_or_init` instruction.
Resolves: rdar://1143502271 parent 1305901 commit e96f9e5
File tree
2 files changed
+65
-5
lines changed- lib/SILGen
- test/SILOptimizer
2 files changed
+65
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1868 | 1868 | | |
1869 | 1869 | | |
1870 | 1870 | | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
1871 | 1874 | | |
1872 | 1875 | | |
1873 | 1876 | | |
1874 | | - | |
1875 | | - | |
1876 | | - | |
1877 | | - | |
1878 | | - | |
| 1877 | + | |
| 1878 | + | |
1879 | 1879 | | |
1880 | 1880 | | |
1881 | 1881 | | |
| |||
1885 | 1885 | | |
1886 | 1886 | | |
1887 | 1887 | | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
1888 | 1902 | | |
1889 | 1903 | | |
1890 | 1904 | | |
| |||
Lines changed: 46 additions & 0 deletions
| 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 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
0 commit comments