[all-commits] [llvm/llvm-project] 320e4e: [C++20] [Coroutines] Mark coroutine done if unhand...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Wed Dec 8 23:07:40 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 320e4efe99d395fcdbc61a65295ecc8b63c9799f
      https://github.com/llvm/llvm-project/commit/320e4efe99d395fcdbc61a65295ecc8b63c9799f
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2021-12-09 (Thu, 09 Dec 2021)

  Changed paths:
    M llvm/docs/Coroutines.rst
    M llvm/lib/Transforms/Coroutines/CoroSplit.cpp
    M llvm/test/Transforms/Coroutines/coro-split-eh-00.ll
    M llvm/test/Transforms/Coroutines/coro-split-eh-01.ll

  Log Message:
  -----------
  [C++20] [Coroutines] Mark coroutine done if unhandled_exception throws

According to [dcl.fct.def.coroutine]/p14:
> If the evaluation of the expression promise.unhandled_­exception()
> exits via an exception, the coroutine is considered suspended at the
> final suspend point.

But this is not implemented in clang before. This patch would implement
this feature by marking the coroutine as done at the place of
coro.end(frame, /*InUnwindPath=*/true ).

Reviewed By: rjmccall

Differential Revision: https://reviews.llvm.org/D115219




More information about the All-commits mailing list