[PATCH] D45860: [Coroutines] Catch exceptions in await_resume
Brian Gesiak via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 4 07:09:55 PDT 2018
modocache added a comment.
Thanks again for all the reviews, @GorNishanov! Very much appreciated.
================
Comment at: lib/CodeGen/CGCoroutine.cpp:220
CGF.EmitBlock(ReadyBlock);
+ CXXTryStmt *TryStmt = nullptr;
+ if (Coro.ExceptionHandler && Kind == AwaitKind::Init) {
----------------
GorNishanov wrote:
> I suggest to check whether await_resume expression is noexcept and omit emission of all of the goo. Most of the time the await_ready for initial_suspend will be noexcept and thus we would not need to emit extra stuff.
>
Oh shoot, I forgot to do this! I'll take care of this in a follow-up commit within the next week.
Repository:
rC Clang
https://reviews.llvm.org/D45860
More information about the cfe-commits
mailing list