Page MenuHomePhabricator

[coroutines] Add __builtin_coro_noop => llvm.coro.noop
ClosedPublic

Authored by GorNishanov on Mar 31 2018, 7:16 AM.

Details

Summary

A recent addition to Coroutines TS (https://wg21.link/p0913) adds a pre-defined
coroutine noop_coroutine that does nothing. To implement this feature, we implemented
an llvm.coro.noop intrinsic that returns a coroutine handle to a coroutine that
does nothing when resumed or destroyed.

This patch adds a builtin __builtin_coro_noop() that maps to llvm.coro.noop intrinsic.

Related llvm change: https://reviews.llvm.org/D45114

Diff Detail