Commit 5d9ab63
committed
[move-only] When we emit a noncopyable temporary allocation, always attach a mark_must_check [consumable_and_assignable].
Most of the time SILGen already emits these correctly without having extra
copies, but in certain situations SILGen will emit copies that we need the move
checker to eliminate (e.x.: when we generate a yield). An additional benefit is
that this also will catch places where the frontend makes a mistake.
This also removes a bunch of "copy of noncopyable" types error that showed up in
the implicit compiler generated modify.1 parent 508bf8a commit 5d9ab63
File tree
3 files changed
+266
-187
lines changed- lib/SILGen
- test/SILGen
3 files changed
+266
-187
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1964 | 1964 | | |
1965 | 1965 | | |
1966 | 1966 | | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
1967 | 1970 | | |
1968 | 1971 | | |
1969 | 1972 | | |
1970 | 1973 | | |
1971 | 1974 | | |
1972 | 1975 | | |
1973 | 1976 | | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
1974 | 1980 | | |
1975 | 1981 | | |
1976 | 1982 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
369 | 370 | | |
370 | 371 | | |
371 | 372 | | |
| |||
377 | 378 | | |
378 | 379 | | |
379 | 380 | | |
| 381 | + | |
380 | 382 | | |
381 | 383 | | |
382 | 384 | | |
| 385 | + | |
383 | 386 | | |
384 | 387 | | |
385 | 388 | | |
| |||
390 | 393 | | |
391 | 394 | | |
392 | 395 | | |
393 | | - | |
| 396 | + | |
| 397 | + | |
394 | 398 | | |
395 | 399 | | |
396 | 400 | | |
| |||
0 commit comments