Skip to content

Commit 2ec85da

Browse files
authored
Update Coroutines.rst
1 parent e0ef787 commit 2ec85da

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

llvm/docs/Coroutines.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -755,11 +755,11 @@ Custom ABIs and Plugin Libraries
755755

756756
Plugin libraries can extend coroutine lowering enabling a wide variety of users
757757
to utilize the coroutine transformation passes. An existing coroutine lowering
758-
is extended by: 1. defining custom ABIs that inherit from the existing ABIs,
759-
2. give a list of generators for the custom ABIs when constructing the
760-
`CoroSplit`_ pass, and 3. use `coro.begin.custom.abi` in place of `coro.begin`
761-
with an additional parameter for the index of the generator/ABI to be used for
762-
the coroutine.
758+
is extended by:
759+
760+
#. defining custom ABIs that inherit from the existing ABIs,
761+
#. give a list of generators for the custom ABIs when constructing the `CoroSplit`_ pass, and
762+
#. use `coro.begin.custom.abi` in place of `coro.begin` that has an additional parameter for the index of the generator/ABI to be used for the coroutine.
763763

764764
A custom ABI overriding the SwitchABI's materialization looks like:
765765

@@ -777,7 +777,7 @@ pass looks like:
777777
.. code-block:: c++
778778

779779
CoroSplitPass::BaseABITy GenCustomABI = [](Function &F, coro::Shape &S) {
780-
return new CustomSwitchABI(F, S);
780+
return std::make_unique<CustomSwitchABI>(F, S);
781781
};
782782

783783
CGSCCPassManager CGPM;

0 commit comments

Comments
 (0)