Skip to content

Commit 1f83726

Browse files
committed
[Coroutines] Fix a typo in documentation
In the example, the variable that's crossing suspend point was referred wrongly, fix it. Differential Revision: https://reviews.llvm.org/D83563
1 parent b3afad0 commit 1f83726

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/docs/Coroutines.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,10 @@ Coroutine Transformation
257257
One of the steps of coroutine lowering is building the coroutine frame. The
258258
def-use chains are analyzed to determine which objects need be kept alive across
259259
suspend points. In the coroutine shown in the previous section, use of virtual register
260-
`%n.val` is separated from the definition by a suspend point, therefore, it
260+
`%inc` is separated from the definition by a suspend point, therefore, it
261261
cannot reside on the stack frame since the latter goes away once the coroutine
262262
is suspended and control is returned back to the caller. An i32 slot is
263-
allocated in the coroutine frame and `%n.val` is spilled and reloaded from that
263+
allocated in the coroutine frame and `%inc` is spilled and reloaded from that
264264
slot as needed.
265265

266266
We also store addresses of the resume and destroy functions so that the

0 commit comments

Comments
 (0)