-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Commit 05abce5
Auto merge of #146059 - folkertdev:va-end-lifetime, r=saethlin
explicitly end the lifetime of `va_list`
tracking issue: #44930
split out from: #144549
The `va_list` is created in the compiler itself when the variable argument list `...` is desugared, and hence the lifetime end is not inserted automatically. The value can't outlive the function in which it was created, so it is correct to end the lifetime here. Ending the lifetime explicitly also appears to give slightly better codegen in #144549.
I also included a little drive-by improvement to not cast pointers to integers and back again.
r? codegen2 files changed
+9
-3
lines changedLines changed: 6 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
31 | - | ||
32 | - | ||
33 | - | ||
31 | + | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | ||
36 | + | ||
34 | 37 |
| |
35 | 38 |
| |
36 | 39 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
519 | 519 |
| |
520 | 520 |
| |
521 | 521 |
| |
522 | + | ||
523 | + | ||
524 | + | ||
522 | 525 |
| |
523 | 526 |
| |
524 | 527 |
| |
|
0 commit comments